Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
XSL component and looping
koubasco
Hello all,
I have a specs to create content in tabs using a SitePublisher component. The content is created using DCTs. In the content xml section of my component, I can select the DCR I would like to display in a tab, in this case, multiple dcrs of different content type.
When I select a DCR, I would like to call a particular xsl template to render my dcr. I am using a element and a statement to select the appropriate xsl template. For some reason, the content of each dcr is rendered multiple times. If I attached 2 dcrs to the component, the content of each dcr get rendered twice.
Any idea why this is happening?
Please see attached the section of the code, xsl and xml.
Find more posts tagged with
Comments
ReggieRWalker
I think you should probably add the XSLT. That's where the rendering happens.
Rick Poulin
There's two problems.. one, your if conditions aren't doing what you'd expect, and two, you're looking at the whole xml tree rather than the current loop iteration context.
Do this instead:
[PHP]
[/PHP]
Also, because your conditions are mutually exclusive, you should consider using xsl:choose+xsl:when instead of xsl:if
koubasco
Works like a charm! Thanks