XSLT for-each with modulo and offset Ninja help needed [SOLVED]
This is an open discussion with no replies, filed under XSLT.
Search
Create an account or sign in to comment.
This is an open discussion with no replies, filed under XSLT.
Create an account or sign in to comment.
Quick Links
Symphony • Open Source XSLT CMS
--with-xsl
)
I'm in need of some assistance with a puzzling output method I require.
I need to split a series of news articles into groups of 8. Currently using a for-each to achieve this and checking on
position() mod 8 = 1
for the split into div containers.. got that working fine.Now within that loop, I'm trying to position a twitter square/graphic as the first tile and push all the content one div onwards.. hence affecting the position() value of all elements.. is this where I need to be storing it all in a variable and then using the node-tree fragment method of accessing the content maybe?
Basically I want a grid of news articles split into 8 but the very first article isn't an article but a link to the clients twitter page.. still respecting the order/count of articles in a tiled visual.. (obviously the first page of articles will have a count of 7 with all subsequent splits having a count of 8...
make sense at all?
EDIT
It was indeed EXSLT Node-set solution by storing the original node XML in a variable and edding my node element to a new variable that combined the two.. then the for-each loop was applied to the new node-set variable :)