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)
Multiple Presentation Templates per DCR
Tob
Right Now I need 4 seperate tpl's for each DCR in one of my templating soulutions. These 4 tpl's could be combined into 1 if I could just pass a parameter into the template's perl logic.
Can this be done?
Find more posts tagged with
Comments
akshathp
Depends on what is this parameter. Is it a field in your DCR?
Can you provide more details? There are iwperl routines which can help you fetch information that you are looking for but before that please specify what kind of parameter are we talking about here.
Thanks!
Akshat Pramod Sharma
Interwoven Inc.
Tob
As an example, lets say that I need to create an htm page for 2 colors (yellow and blue). Right now I have 2 separate presentation templates for each color
###### template for yellow #######
FOR EACH DCR LOOP{
if (color = yellow){
iwptout "yes"
}
}
###### template for blue #######
FOR EACH DCR LOOP{
if (color = blue){
iwptout "yes"
}
}
My 2 templates are much more involved but the idea is the same. My code for both templates is the same with the only exception being the "color = testvalue" statement. If I could somehow pass in a parameter to the template, I could use one template which reads "color = parametervalue"
Does this make sense
akshathp
One way to accomplish this is by using a "hidden" value in this case. Please refer to Templating Developer's guide for syntax and usage.
And if this field is the one which user inputs then it can be a standard "item".
Hope this helps!
Akshat Pramod Sharma
Interwoven Inc.
Adam Stoller
Not sure if this really helps you, as it still requires multiple presentation templates, but you could code all the common information into one presentation template and then *include* that template in the other presentation templates where you explicitly set some value to "blue" or "yellow".
Can you elaborate a bit more on what you are doing? I.e. is this like color separation where you need to print out the different color layers separately and then they get combined later - or am I reading too much into your "blue" and "yellow" example?
--fish
(Interwoven Senior Technical Consultant)