Inline tag widget parameter reference
You configure inline tag widget instances by setting the following Javascript parameters.
Mandatory parameters
The following parameters are mandatory for the tag widget.
id = unique_IDUse this attribute to specify a unique ID for parsing all surrounding <div> tags to enable widgets
resourceIDUse this parameter to specify the identifier of the piece of content that will show the widget. This needs to be unique. For example, for a portal page specify the portal object ID of that page.
resourceTitleUse this parameter to specify the title of piece of content. This title string is passed to the dialog box when the user opens it to add new tags. If you do not want the dialog box to show a title, you can omit the value for this parameter.
resourceType = NAVIGATION_NODE | CONTENT_NODEUse this parameter to specify the type of the resource for which the rating widget is called. This parameter is mandatory only for portal resources such as pages or portlets. Valid values are NAVIGATION_NODE or CONTENT_NODE .
Optional parameters
The following parameters are optional for the tag widget. They correspond to similar parameters in the CP Configuration Service.
countsEnabled = falseUse this parameter to specify whether the count of each community tag is displayed. The count shows how often the tag has been applied by users. The default value is false . To have the count of each community tag displayed, specify true . The count is then displayed in parentheses.
customLabelUse this parameter to specify a non-localized custom label to describe the displayed tags. If you do not want any further labelling or if you want to keep the label short, this can be an empty string.
customMessageNoTagsUse this parameter to specify a non-localized custom label that you want to be displayed if no tags are available. This can happen when users have not assigned tags to the piece of content yet. Non-localized means that the label does not change with the browser language. This parameter has no default value.
displayTwisty = (COLLAPSED)Use this parameter to specify the behavior of the twisty that is displayed as part of the inline tag widget. Valid values are COLLAPSED|EXPANDED|HIDDEN :
COLLAPSEDThe twisty is displayed but closed. Default.
EXPANDEDBoth the twisty and the widget are shown.
HIDDENThe twisty is not displayed. The widget is open and cannot be closed.
messageFadeOutDuration = (1000)Use this parameter to specify the time that the fade-out action of return messages takes in milliseconds. This affects the fade-out after information, warning, or error messages that have been displayed. The default is 1000 milliseconds.
tagScope = (COMMUNITY_PERSONAL_PUBLIC)Use this parameter to specify the scope of tags that you want to show in this inline widget. Specify one of the following values:
ALL|COMMUNITY|PERSONAL|PERSONAL_PUBLIC|PERSONAL_PRIVATE|COMMUNITY_PERSONAL_PUBLICIf you do not specify a value, the parameter defaults to COMMUNITY_PERSONAL_PUBLIC .
resourceCategories = ["resrc_category_1", "resrc_category_2", . . . "resrc_category_n"]Use this parameter to specify an array of categories assigned to the resource for which the widget was called. Represent each category by a string, for example Books or a Web Content Manager category. A typical value is ["books", "action"] .
resourceTypeUse this parameter to specify the portal resource type. This can be either CONTENT_NODE or NAVIGATION_NODE . Specifying this parameter is mandatory for portal resources only.
resourcePrivate = true|falseYou can set this parameter to avoid access control issues with private resources. Users can only add private tags to private resources. The default value is false .
maxResults = 5Use this parameter to specify the number of tags shown per resource. The default value is 5 .
order = DESC|ASCUse this parameter to specify the order direction for displaying the tags. This parameter is related to the parameter orderMetric . It can take the following values:
DESCDefault.value. It specifies descending order. For example, when the default TAG_SPACE_COUNT_REVERSE_NAME is specified for order metric parameter above, tags with the highest count and the lowest character in the alphabet are listed first.
ASCSpecifies ascending order. For example, if the order metric parameter is specified as orderMetric = TAG_SPACE_COUNT , tags with the lowest count are listed first.
orderMetric = TAG_SPACE_COUNT_REVERSE_NAMEUse this parameter to specify the order metric for the order by which the tags are displayed. To determine the actual order, use the parameter order . The default value is TAG_SPACE_COUNT_REVERSE_NAME . This default means that tags are shown first by the tag count, with resources with more tags shown before resources with fewer tags, then, if resources have the same number of tags, alphabetically. Other possible values are:
For more details refer to the class com.ibm.portal.cp.Constants.OrderMetric in the portal Javadoc.
- TAG_SPACE_NAME
- TAG_SPACE_COUNT
- TAG_SPACE_CREATION_DATE
- TAG_SPACE_LAST_MODIFIED_DATE
- TAG_SPACE_COUNT_NAME
tagClickActionMode = TAG_CENTER|PUBLIC_RENDER_PARAMETERUse this parameter to determine what happens when a user clicks a tag. Valid values are:
TAG_CENTERWith this value the widget redirects the user to the tag center. Default.
PUBLIC_RENDER_PARAMETERWith this value the widget exposes a public render parameter with the tag name.
showDialogLauncher = true|falseUse this parameter to control whether a plus ( + ) button for starting the corresponding dialog widget is shown. The default is true .
tagDialogWidgetParametersUse this parameter to specify a JSON object that contains optional configuration parameters for the tag dialog widget instance that opens when a user clicks the plus sign in the inline widget. For a list of possible parameters refer to the topic about the Tag dialog widget parameter reference. The mandatory parameters that were already specified for the inline widget are applied to the dialog widget instance that starts. These are resourceID , resourceTitle , resourceType , resourceCategories . For example, you cannot override the resourceID by specifying a different one in this object here.
tagsChangedEvent = (tagsChanged)Use this parameter to specify the event that informs the inline widget about changes to the tags for the resource. This allows the inline widget to update the tag set, for example if a user adds a tag in the dialog widget. The default value is tagsChanged. The event name specified here must match the event name specified for the tag dialog widget.
tagsClickable = true|falseUse this parameter to determine whether the tags can be clicked for redirection or public render parameter exposure. The default is true .
tagScope = (COMMUNITY)Use this property to specify the default scope for the tags that are displayed. The default value is COMMUNITY .
tagClickTransmitScopes = (false)Use this parameter to specify whether scopes to which a tag belongs, for example categories, are transmitted, when a user clicks a tag. Setting this parameter set to true makes sense only if you also set the parameter com.ibm.wps.cp.tagging.inline.tagsClickable to true .
Parent
Parameter reference for the tag and rating widgets
Tag dialog widget parameter reference
CP Configuration Service for tagging and rating
Capitalized "s" in JavaScript. Reflected in .dita source.