I'm new at Umbraco, and hitting a problem with XSLT.
I've got a couple of nodes, i.e.
[code]
Day 1
Day 2
Day 3
Day 4
[/code]
What I would like to achieve is an output like this:
[code]
Day 1, Day 2
Day 3, Day 4
[/code]
The problem, of course, is that I have to open my div-tag on one node, and close it on another. When I try to do this, validation fails, and my XSLT won't render.
I think there should be an easy solution for this, but I can't seem to find it using Google. Can any of you help me out here?
I'm pretty sure you'll be using a for-each loop to loop through the nodes.
In that case, use position(), first(), last() and modulo functions to determine whether you'd need to open, close a div element.
[code]
...
[/code](It's just a start here, written without testing...)
Grouping multiple nodes
I'm new at Umbraco, and hitting a problem with XSLT.
I've got a couple of nodes, i.e.
[code]
Day 1
Day 2
Day 3
Day 4
[/code]
What I would like to achieve is an output like this:
[code]
Day 1, Day 2
Day 3, Day 4
[/code]
The problem, of course, is that I have to open my div-tag on one node, and close it on another. When I try to do this, validation fails, and my XSLT won't render.
I think there should be an easy solution for this, but I can't seem to find it using Google. Can any of you help me out here?
Try use xslt text element and put div into cdata section
Petr
Hi,
I'm pretty sure you'll be using a for-each loop to loop through the nodes.
In that case, use position(), first(), last() and modulo functions to determine whether you'd need to open, close a div element.
[code]
...
[/code](It's just a start here, written without testing...)
Hope this helps.
Regards,
/Dirk
is working on a reply...