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?


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 :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details