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)
iw_load_dcr and iw_iterate
vahu
Hi,
Does anyone, from top of their head, know how to access replicant (iw_iterate) in a loaded dcr (iw_load_dcr) ?
Presume the loaded DCR has a replicant item named "person" and this replicant has a "first name" item and a "last name" item. How do I in my current DCR access all the persons in the loaded dcr with an iw_iterate ?
Any help/hint will be greatly appreciated.
Regards
Saya
Find more posts tagged with
Comments
awizardly
Take a look at some of the references here.
http://support.interwoven.com/library/devel/tst/pt/TeamSite__PT__iw_load_dcr.html
Some basics. When you call
<iw_load_dcr var='bar' file='foo/bar.xml'/>
This parses and loads the dcr in file foo/bar.xml as a referenceable variable called bar.
Assuming in your case bar.xml is of the form
<people>
<person>
<first>foo</first>
<last>bar</last>
</person>
<person>
<first>foobie</first>
<last>bletch</last>
</person>
</people>
do an iw_iterate on bar.people.person
<iw_iterate var='person' list='bar.people.person'>
<iw_value name='person.first' />
<iw_value name='person.last' />
</iw_iterate>
Look at the perldoc, it has a much more extensive set of examples and discussions about where the loaded dcr can be referenced and other options while loading dcrs
Lee
Organic Inc
http://www.organic.com
vahu
Hi awizardly,
Thanks for your reply. I had read all the documentation and also done something similiar before. But I did not know that somebody had updated the DCT with a container around the replicant item. Then understandable it did not give any results :-(.
With the proper xpaths things started working.
Regards
Saya