Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Specify an alternate page template XSL for generate HTML workflow task
Garth McMillan
Hello,
We would like to invoke the com.interwoven.livesite.tools.PageGenerator class during workflow to generate a HTML version of our .pages. However, we would like to use an alternative page layout XSL for these HTML versions.
For example, in preview (using .page files) we would like to output the component's generated HTML as normal, but when generating the HTML version of the page via this task, we would like to output different HTML for certain components by way of an "include virtual" reference, eg. <!--#include virtual="/path/to/service?parameter1=fromComponent¶meter2=fromComponent"--> (to allow us to maintain some dynamic aspects on a non-LiveSite runtime environment).
We only temporarily want to deploy these static HTML pages, so we'd like to limit changes to the underlying .page architecture. Ideally, we would like to deploy these HTML versions in addition to the .page files in order to keep the files in sync, for when we are ready to change over to the LiveSite runtime.
It appears the com.interwoven.livesite.tools.PageGenerator class only supports the following parameters: suffix, username, role, destDir and vpath. No way to directly specify an alternative template.
Is there a way we can use a different template when calling this task?
We are using TeamSite 6.7.2 SP2 with SitePubliser/LiveSite.
Thanks.
Find more posts tagged with
Comments
Rick Poulin
I don't quite get where you're going with this, so let me attempt to solve what appears to be your actual problem: generating different output depending on the context (preview/generation/runtime). The easiest (and the only supported way) of doing this is with an external and/or page controllers. The RequestContext object allows you to make that determination, and then you can do whatever you want with the returned XML from there.
Now, in case i misunderstood the problem.. I'm guessing you're looking to have a different version of fixed-layout.xsl? It can't be done by any supported mechanism. The documentation claims you can add new rendering definitions, but in 7.1 that wasn't working. I don't know if that was the case in 6.7.2, and I don't know if it's been fixed in 7.2 (but I don't think so). Even then, your config would cause it to *always* use a specific page XSL, and it wouldn't get you any nearer to the dynamic behaviour you seek. With your approach, it sounds like you'd have no choice but to somehow hack your own PageGenerator class in there, and that's jumping off a cliff in unsupportedland.
Capture.GIF
Garth McMillan
Thanks for that. I'll look into using the RequestContext object. We had expected that may be the only way to do it.
I was simply hoping that there was a way to do it without modifying the components/templates.