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)
reading OR replicant
Renata
would anyone who worked with "or" replicants share with me how to display their values via tpls?
I have tired the <iw_iterate><iw_value /> combination as well as some <iw_perl> variations and am getting to a bit frustrated trying to get these values out.
I basically have <item><replicant "or"><item1><item2></replicant></item>
thank you ...
Find more posts tagged with
Comments
LooseCannon
post the code you've tried and we can tweak it from there
gzevin
use something like
(here "Itemised Contacts" and "Free-form Contacts" are in OR-replicant)
<iw_iterate var="node" list="dcr.National Bulletin.Bulletin Footer.Contacts.*">
<iw_ifcase name="node">
<iw_case type="Itemised Contacts">
<iw_perl><![CDATA[ $contact_type='itemised';
]]></iw_perl>
</iw_case>
<iw_case type="Free-form Contacts">
<iw_perl><![CDATA[ $contact_type='free';
]]></iw_perl>
</iw_case>
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Renata
thanks Greg for your help.
this morning it looks like my code actually works - caching issue ...
however, I see you use <iw_ifcase> in you code above. I have simply been calling <iw_value name1/><iw_value name2/> withing my <iw_iterate> tags and if either one is null than it just doesn't display them. your code seems 'safer', woul dyou know of implications if I don't validate my values?
thanks a bunch ... r
gzevin
well, I *try* to write a generic code that could be re-used later on, and not to rely (at least heavily) on a particular DCR structure
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU