Ok, it has been ages since i last asked a question about XSLT, but i am in a situation where i have to edit some files written in the old schema which i have zero clue about.
It is a simple list of latest news posts sorted by date. Now i need to add a new property (true/false) which the editor can tick off wether it should be a sticky or not, and the xslt needs to be edited to reflect this. How do i go about doing this?
Old xslt schema help! List of nodes by date, but with sticky node on top.
Ok, it has been ages since i last asked a question about XSLT, but i am in a situation where i have to edit some files written in the old schema which i have zero clue about.
It is a simple list of latest news posts sorted by date. Now i need to add a new property (true/false) which the editor can tick off wether it should be a sticky or not, and the xslt needs to be edited to reflect this. How do i go about doing this?
Here is the current code:
Hi Frederik,
Here's a way to test for stickiness - assuming it's a boolean property named sticky on the documents being iterated:
/Chriztian
Thank you for the quick reply! But is there a way to get it on top of the list? If its possible with xslt that is.
Oh yes :-)
One smart way would be to make them sort to the top - add this sort before the one for @createDate:
/Chriztian
Ah yes of course! It makes sense now to use sort. I was just confused by the old schema which i havent tried before. Thanks for the help!
is working on a reply...