Yes, from what I can tell, the UpdateDate corresponds with the date the node was published.
Eg. if you create a new node, fill in some data for some of the properties, and then save the node and set it to publish five minutes later, UpdateDate will reflect the timestamp for when the node was automatically published, not when you last saved the node.
Sort pages by publish date
I have the following code in a macro that lists information from child pages in one parent.
Now I want to sort the children by their published date. How do I do this?
Your help would be much appreciated.
Thanking you in anticipation.
Roger
Hi Roger,
You can use LINQ to sort the items for you - eg:
This will give you a collection with the newest child first (ascending order).
If you instead want the most recent children at the top (descending order), you can change the code to:
To update your own example, listing the children in ascending order, the code will look like:
Thanks, Anders.
Does .UpdateDate get the Published date?
Yes, from what I can tell, the
UpdateDate
corresponds with the date the node was published.Eg. if you create a new node, fill in some data for some of the properties, and then save the node and set it to publish five minutes later,
UpdateDate
will reflect the timestamp for when the node was automatically published, not when you last saved the node.Hi Roger,
You should be able to do it by this
Hope this helps,
/Dennis
is working on a reply...