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)
Nested Replicants using iw_tags?
Tim__D
I'm missing something in my markup and am unable to iterate through a replicant item which is nested within another replicant.
Here are two methods I have tried. Any help you could provide is appreciated! Thanks
<iw_iterate list="dcr.Level 1" var="Level_1" iteration="Level_1_count">
<iw_if expr="{iw_value name='Level_1.Name'} ne ''">
<iw_then>
<iw_value name='Level_1.ID'/><br />
<iw_value name='Level_1.Name'/><br />
<iw_value name='Level_1.URL'/><br />
</iw_then>
<iw_iterate list="Level_1[Level_1_count].Level 2[Level_2_count]" var="Level_2" iteration="Level_2_count">
<iw_if expr="{iw_value name='Level_2.Name'} ne ''">
<iw_then>
<iw_value name='Level_2.Name'/><br />
<iw_value name='Level_2.URL'/><br />
</iw_then>
</iw_if>
</iw_iterate>
</iw_if>
</iw_iterate>
<iw_iterate list="dcr.Level 1" var="Level_1" iteration="Level_1_count">
<iw_if expr="{iw_value name='Level_1.Name'} ne ''">
<iw_then>
<iw_value name='Level_1.ID'/><br />
<iw_value name='Level_1.Name'/><br />
<iw_value name='Level_1.URL'/><br />
</iw_then>
<iw_iterate list="Level_1.Level 2" var="Level_2" iteration="Level_2_count">
<iw_if expr="{iw_value name='Level_2.Name'} ne ''">
<iw_then>
<iw_value name='Level_2.Name'/><br />
<iw_value name='Level_2.URL'/><br />
</iw_then>
</iw_if>
</iw_iterate>
</iw_if>
</iw_iterate>
Find more posts tagged with
Comments
Dwayne
Your second example is basically correct. However, you've got a problem with the placement if the close of the outer <iw_if> tag. I suspect if you put the inner <iw_iterate>
inside
the </iw_then> it will work better.
You should also be closing the {iw_value} tags. I'm not positive it's required, but it's a good idea for consistency's sake. So instead of {iw_value name="blah"} use {iw_value name="blah"
/
}
--
Current project: TS 5.5.2/6.1 W2K
Tim__D
Yes that was it. Thanks for the help.