Create a plug-in tag
Rendering plug-ins are referenced using the plug-in tag.This is the format of a plug-in tag:
[plugin:pluginname paramKey="paramVal" ] Tag Body Content [/plugin:pluginname]To create a plug-in tag:
- Click Insert a Tag from a component or element design field. The Tag Helper dialog opens.
- Select Plugin Component as the tag type.
- Select the plug-in to reference.
- Select whether to include start and end sections. You can enter additional text between the start and end sections of the tag including other web content tags such as a component or element tag.
- Click OK to add the tag to design.
- You can then add custom parameters to tag design.
You can specify multiple parameters using the following format:
paramKey1="paramVal" paramKey2="paramVal" paramKey2="paramVal2"
Examples
Simple tagTo reference a plug-in without specifying any parameters or tag body content:
[plugin:pluginname ]
Simple tag with parameters
To reference a plug-in with parameters but no tag body content:
[plugin:pluginname paramKey1="paramVal" paramKey2="paramVal" paramKey2="paramVal2" ]
Plug-in tag with web content tag as a parameter
[plugin:pluginname paramKey1=" [IDCmpnt context='current' type='sitearea' field='id' ]" ]You must use single quotes within the web content tag being used as a parameter value.
Plug-in tag with body content
To reference a plug-in with parameters and content including a reference to a component:
[plugin:pluginname paramKey1="paramVal" paramKey2="paramVal" paramKey2="paramVal2" ] This is the tag body content. <br> [component name="test"] <br> More content. [/plugin:pluginname ]
Remote action plugin tag example
You can reference remote actions using plugin tags using the following format:
[plugin:RemoteAction action=" " docid=" " useCurrentSelection=" " dialog=" " useCurrentContext=" "]action=
This is the remote action to perform.
docid=
This is the document ID of the item to run the remote action against.
useCurrentContext=
If set to true, then the document ID is obtained form the rendering context instead of the docid attribute.
dialog=
If set to true, when rendered within a JSR 286 web content viewer portlet the remote action is rendered as a URL that redirects the user to a hidden portal page used by the JSR 286 web content viewer for inline editing.
This is an example of a "new" action to create a content item:
[plugin:RemoteAction action="new" type="com.ibm.workplace.wcm.api.WCM_Content" pid="com.ibm.workplace.wcm.api.WCM_SiteArea/ID2" atid="com.aptrix.pluto.presentation.template/ID1" wcmfield.content.name="newcontent" wcmfield.autosave="true" wcmfield.saveValidate="true" ]
JSP plugin tag:
Render plug-ins can be referenced within JSP code using the following format:
<wcm:plugin name=" " param1="value" param2="value2" > // Your text. </wcm:plugin>
Content-ready plugins
Parent
Create web content tagsRelated
December 14, 2011
Apr 1, 2011 1:26:17 PM
});