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'm currently struggling with this and I can't seem to find documentation on it either.
I have a couple of unpublished articles on my site that I keep for editing, future publishing etc. The thing is that I want to order them on my site in the time they were published.
I currently use this line of code: var selection = CurrentPage.Site().FirstChild("news").Children("articles").Where("Visible").OrderBy("CreateDate desc");
var selection = CurrentPage.Site().FirstChild("news").Children("articles").Where("Visible").OrderBy("CreateDate desc");
As you can see. They're ordered by the date they were created. However. I would like to order them by the date/time they were published.
Use UpdateDate instead of CreateDate but note that if you / users update the content then the UpdateDate will be the last datetime of publish.
I'd suggest that you add a Date Time picker to your article which allows the user to set a publish date for display / sorting.
There's a discussion here:
I figured that's what I had to do. Thx for your answer :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted