In my opinion you can’t use last() because you don’t know if the last updated node is the last! You need a for-each loop. Maybe something like this can help you on the way:
A for-each-loop is not an option since I need to use the nodeId of the latest updated/published node in several places in my xslt.
In the same xslt I need to get the nodeid of a node in a different archive folder with a different nodetypealias.
When I have gotten the both nodes from the different archive folders I need to compare which of these two is the latest and then I will output the latest one.
Get latest node id by @updateDate
I'm trying to get the latest nodeid in a tree sorted by @updateDate, but I can't get it right.
This is what I got:
[code]
[/code]
But this only gets the latest node by createDate, I want by updateDate.
Note that I need to use the latestArticle variable on several places and I can't use a for-each loop with a sort.
Does anybody have an idea?
In my opinion you can’t use last() because you don’t know if the last updated node is the last! You need a for-each loop. Maybe something like this can help you on the way:
Hope it helps.
/Finn
A for-each-loop is not an option since I need to use the nodeId of the latest updated/published node in several places in my xslt.
In the same xslt I need to get the nodeid of a node in a different archive folder with a different nodetypealias.
When I have gotten the both nodes from the different archive folders I need to compare which of these two is the latest and then I will output the latest one.
[code]
[/code]
[code]
[/code]
the variable lastUpdatedNode should now contain your last updated node.
If I write:
[code]
[/code]
Then I get nothing in the output
and if you write:
[code]
[/code]
still noting?
is working on a reply...