Multiple Page Templates





2008-07-1 6

Initial version.


Presently, the page template for ePublisher, Page.asp, is one size fits all. The reason it fits all is due to support for conditions in ePublisher page templates.

Customers on wwp-users requested that ePublisher support multiple page templates which are then associated with different page styles in the ePublisher UI.

Possible Approach

To start, you'll need to override the file that controls which page template is loaded:


We load the default page template, though one can add an option for selecting a different one (or just use the page style name). It would involve something like:


One would need to be careful about doing this in a project with multiple formats. What happens when one of the formats does not define the requested page template?


Project was reviewed and quickly revealed that the above notes are incomplete. The final code looks like:

with additional references to GlobalPageTemplate and GlobalPageTemplatePath replaced with VarPageTemplate and VarPageTemplatePath respectively.

Updated project attached:

NOTE: Original project was configured to use 2009.3 transforms, but was actually running 2008.1 transforms. Project was updated by removing all unnecessary/unmodified transforms from the Formats folder and then picking up changes made in the 2009.3 release.

DevCenter/Projects/Multiple Page Templates (last edited 2010-07-14 21:29:08 by BenAllums)