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 <iw_iterate> in TPLs
System
I am trying to use Nested <iw_iterate> in TPLs, but only the first (upper) <iw_iterate> works. The second one is not, and should be contained within the first iterate.
See attached code snippet.
Find more posts tagged with
Comments
mogoo
Is Links within Section? If so, it should be referenced like this...
<iw_iterate list='quesresults.Links' var='quesresults'>
-maureen
Migrateduser
It didnt work, but I did try using secresults from the first iterate and it did work. (Quesresults was the internal iterate inside of Section [secresults]). I'll iron this out some more...
Worked: (see attached)
Migrateduser
Is there a way to assign a generated number to the iterated rows to for creating anchors for jumping down in the page. The top of the page will contain a table of contents, with links to within the page. Everything will be in the same order in the toc and in details - this is a faq type of tpl/page.
mogoo
Duh. Yeah, sorry about that, I rushed through and missed changing quesresults to secresults...
As far as numbering, somebody may have a more elegant way; the only way I know how to do that is to put a counter in with iw_perl. It would look something like this (remember to put CDATA tags around your iw_perl stuff)...
<iw_perl> $n = 0; </iw_perl>
<iw_iterate......
<iw_perl> $n++;</iw_perl>
<a name="$n">....
...</iw_iterate>
Good luck!
maureen
Migrateduser
I tried using what you recommended, but am not able to generate numbered anchors for TOC links. I know I saw an example of this not too long ago. See attached file of current code to create an linked TOC.
Thanks
Edited by moorechi on 08/11/03 11:26 AM (server time).
mogoo
you need to put the CDATA open & close tags INSIDE of the iw_perl tags
mogoo
...try this