Creating 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:

  1. Click Insert a Tag from a component or element design field. The Tag Helper dialog opens.
  2. Select Plugin Component as the tag type.
  3. Select the plug-in to reference.
  4. 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.
  5. Click OK to add the tag to your design.
  6. You can then add custom parameters to your tag design. You can specify multiple parameters using the following format:
    paramKey1="paramVal" paramKey2="paramVal" paramKey2="paramVal2"

Examples

Simple tag
To 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' ]" ]
Note: 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 that is 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:
Rendering plug-ins can be referenced within JSP code using the following format:
<wcm:plugin name=" " param1="value" param2="value2" >

// Your text.

</wcm:plugin>