Tuesday, June 9, 2009

Overriding the Web Content Management (WCM) presentation template by way or URL parameter in v6 functions differently from v5

Question
You utilize the pageDesign= URL parameter to control which presentation template to display at time or rendering in Web Content Management (WCM) v6 and receive unexpected results compared to v5


Answer
The solution varies depending on where you call the URL command your version of Web Content Management.
v5:

To override or to specify a specific presentation template (or page design) to a WCM object at time of rendering, append the following URL parameter depending on the request context.

For a servlet: some_url?pageDesign=my_template


For a portlet: some_url&pageDesign=my_template

v6

To override or to specify a specific presentation template (or page design) to a WCM object at time of rendering, append the following URL parameter depending on the request context.

Scenario 1: If you are loading the presentation template from the same library as the object you are rendering:

For a servlet: some_url?pageDesign=my_template

For a portlet: some_url&pageDesign=my_template

Scenario 2: If you are loading the presentation template from a library that is different than that of the object being rendered:

For a servlet: some_url?pageDesign=my_library/my_template

For a portlet: some_url&pageDesign=my_library/my_template