Customizing user XML element templates  Chapter 9: Building Catalogs

Chapter 8: Building Templates

Enabling different templates for the same element

To apply different templates to the same element, create the xsltinfo.properties file and populate it with new template and user information.

This file should have the following content and structure:

<userid>.<portlet id>.ui=<xslt file>
<userid>.<portlet id>.content=<xsl file>

where:

Place the xsltinfo.properties file in the %SYBASE%\EAServer\Repository\WebApplication\onepage\config directory on Windows and in $SYBASE/EAServer/Repository/WebApplication/onepage/config on UNIX, then restart EAServer.

When each user that is specified in xsltinfo.properties adds the XML_sample page to their portal view, Bob will see the XML_sample portlet with a pink background and Cindy will see the XML_sample portlet with a green background.

To create user-specific content, follow the same procedures in this section, but create a new content template and specify the two different content files in the xsltinfo.properties file; for example:

bob.231.content=moreover_content_xsl
cindy.231.content=new_content_xslt

You can also provide different presentation and different content for different users in this file.

bob.231.ui=pink_ui_xslt
bob.231.content=moreover_content_xsl
cindy.231.ui=green_ui_xslt
cindy.231.content=new_content_xslt

The first time you create xslt.properties, you must shut down and restart EAServer to initialize the user-specific settings. When you make additions, changes, or deletions to the file the portal is updated automatically with the new information; that is, you do not need to restart the application server





Copyright © 2004. Sybase Inc. All rights reserved. Chapter 9: Building Catalogs

View this book as PDF