Hi, I'm trying to display a different banner for pages that fall under a particular menu item (called 'Solution'). In other cases I want the default banner item.
Currently, I'm trying to loop through the ancestors of the current page, check if one of them is named 'solution' and if so, set a value to a flag which I later check to render the appropriate image. However, xslt variables cannot be set once declared, nor do i see any way of checking if the value is set in the for-each loop outside the loop.
Is there anyway I can do that?An alternative way could be to see if there are any elements returned by the condition selected in the for-each, but I'm a noob in xslt, and don't know if this can be done.
Rendering an image based on an ancestor's value
Hi, I'm trying to display a different banner for pages that fall under a particular menu item (called 'Solution'). In other cases I want the default banner item.
Currently, I'm trying to loop through the ancestors of the current page, check if one of them is named 'solution' and if so, set a value to a flag which I later check to render the appropriate image. However, xslt variables cannot be set once declared, nor do i see any way of checking if the value is set in the for-each loop outside the loop.
Is there anyway I can do that?An alternative way could be to see if there are any elements returned by the condition selected in the for-each, but I'm a noob in xslt, and don't know if this can be done.
Thanks in advance!
Never mind, I got it to work :-) Thought i'd share the code.
is working on a reply...