Define presentation templates for WebSphere Commerce content
WebSphere Commerce content in Web Content Management requires three presentation templates:
- A presentation template to display the whole article.
- A presentation template to display the summary of the article.
- A presentation template to display the title of the article.
To define a presentation template in Web Content Management for WebSphere Commerce content, follow the instructions provided in the
![]()
Create presentation templates![]()
Create a presentation template topic in the WebSphere Portal Information Center.When defining presentation templates, ensure that you follow the following rules:
- The presentation template must follow the following naming convention:
Template purpose Template name Display the whole article Presentation_template_name You can specify any name for this presentation template
Display the summary of the article Presentation_template_name -Summary Display the title of the article Presentation_template_name -Title For example, if you create a presentation template to display the whole article called "MyPresentationTemplate", also create a presentation template called "MyPresentationTemplate-Summary" to display the article summary and a presentation template called "MyPresentationTemplate-Title" to display the article title.
- The HTML string for the title of the article must not exceed 254 character due to WebSphere Commerce database restrictions. The 254 character limit includes any HTML tags provided to define the Presentation template for the title.
- The presentation template for displaying the entire article must reference the WebSphere Commerce components defined in the authoring template and the global WebSphere Commerce text components defined when you prepared Web Content Management to create WebSphere Commerce content. The code below displays an example of what the template can look like.
<table width="100%" border="0"> <tr> <td align="left" valign="top"> <!-- Display the Article Title --> <span style='font-size: 25px;color:#427DBE;'> <AptrixCmpnt context="current" key="Title" type="content"/> </span> <br> <!-- Display the Article Main body --> <span style='font-size: 15px;'> <AptrixCmpnt context="current" key="Main body" type="content"/> </span> </td> <td align="center" valign="top"><table width="100%" border="0"> <tr> <td align="left" valign="top"> <!-- Display the Article's Image --> <AptrixCmpnt context="current" key="Article image" type="content"/> </td> </tr> <tr> <td align="center" valign="top"> <div id=products style="padding:0px; border: #99CCCC 2px solid; background-color:#FFFFFF;"> <table width="100%" border="0"> <tr> <td align="center"> <a href="<AptrixLibCmpnt name="Product Display url"/>storeId=<AptrixCmpnt context="current" key="Store ID" type="content"/>&catalogId=<AptrixCmpnt context="current" key="Catalog ID" type="content"/>&partNumber=<AptrixCmpnt context="current" key="Product ID 1" type="content"/>"> <AptrixCmpnt context="current" key="Product image 1" type="content"/> <br> <AptrixCmpnt context="current" key="Product ID 1" type="content"/> </a> </td> <td align="center"> <a href="<AptrixLibCmpnt name="Product Display url"/>storeId=<AptrixCmpnt context="current" key="Store ID" type="content"/>&catalogId=<AptrixCmpnt context="current" key="Catalog ID" type="content"/>&partNumber=<AptrixCmpnt context="current" key="Product ID 2" type="content"/>"> <AptrixCmpnt context="current" key="Product image 2" type="content"/> <br> <AptrixCmpnt context="current" key="Product ID 2" type="content"/> </a> </td> </tr> </table> </div> </td> </tr> </table> </td> </tr> </table>- The presentation template for displaying the summary of the article must only contain the Summary text component from the authoring template. The code below displays an example of what the template can look like.
<span style='font-size: 12px;'><AptrixCmpnt context="current" key="Summary" type="content"/></span>- The presentation template for displaying the title of the article must only contain the Display Title text component from the authoring template. The code below displays an example of what the template can look like.
<span style='font-size: 20px;'> <AptrixCmpnt context="current" key="Title" type="content"/> </span> <br>
Ensure that you
associate the presentation template with the Web Content Management site and site areas you created to contain WebSphere Commerce content.For more information about Web Content Management presentation templates, see the
![]()
Presentation templates![]()
Use presentation templates topic in the WebSphere Portal Information Center.
Related tasks
Prepare IBM Workplace Web Content Management to create WebSphere Commerce content