Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have setup the following folder structure for news: --News | |--Archive | |--2008 | | |--Nov | | | |--Article 1 | | | |--Article 2 | | |--Dec | | | |--Article 3 | | | |--Article 4 | |--2009 | | |--Jan | | | |--Article 5 | | | |--Article 6 |--Article 7 |--Article 8 Now, for my news page I want to get the articles in descending sort order: Article 8 Article 7 Article 6 Article 5 Article 4 ... But I actually get something more like this: Article 8 Article 6 Article 4 Article 2 Article 7 Article 5 Article 3 Article 1 I'm sure I'm missing something simple but how can I achieve what I am looking for in XSLT with a single for-each or do I need to nest them? Thanks
Hi, Care to show the current xslt? Regards, /Dirk
Yes, sorry I should have included it originally. [code]
Solved with the following code which seems to achieve the desired effect. [code] ]> version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library">
I love you for this solution =d> Greets Mario
I'm glad it was of help to someone else. I could do with a bit of additional help though. Would anyone be able to shed any light on how to go about adding paging to this code? I have the following so far but the trouble is it returns the first 15 stories for each child node too. [code] ]> version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library">
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Newslist with Archive
I have setup the following folder structure for news:
--News
| |--Archive
| |--2008
| | |--Nov
| | | |--Article 1
| | | |--Article 2
| | |--Dec
| | | |--Article 3
| | | |--Article 4
| |--2009
| | |--Jan
| | | |--Article 5
| | | |--Article 6
|--Article 7
|--Article 8
Now, for my news page I want to get the articles in descending sort order:
Article 8
Article 7
Article 6
Article 5
Article 4
...
But I actually get something more like this:
Article 8
Article 6
Article 4
Article 2
Article 7
Article 5
Article 3
Article 1
I'm sure I'm missing something simple but how can I achieve what I am looking for in XSLT with a single for-each or do I need to nest them?
Thanks
Hi,
Care to show the current xslt?
Regards,
/Dirk
Yes, sorry I should have included it originally.
[code]
Solved with the following code which seems to achieve the desired effect.
[code]
]>
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
[/code]
I love you for this solution =d>
Greets Mario
I'm glad it was of help to someone else.
I could do with a bit of additional help though. Would anyone be able to shed any light on how to go about adding paging to this code?
I have the following so far but the trouble is it returns the first 15 stories for each child node too.
[code]
]>
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
[/code]
What I really need is someway of keeping an overall count or breaking out when the threshold is reached.
I'm sure I'm missing something simple so any help would be appreciated.
Cheers
Paul
is working on a reply...