i am working on a .net control that shows the lastest 5 published content of the site. i can only get the createDate or the updateDate by the Node class.
how can i get the last published date of the nodes and sort them? do i need to do direct query to database or there are some class in the api that can help?
I don't know if it's possible to find the "last published/created date" in the database...but since it's possible to use rollback on nodes maybe there is someting to be found in the database that can be used. But don't know if it's a best practice or a good idea performance wise if it's possible.
I think I would make a custom date property on the document types and then hook in to one of the publish events to set the current date/time in that field so it gets updated every time the node is published.
I agree that adding a new date property is the easiest way to implement the idea, and actually I did think of this before posting here, but I am curious if there is something build-in to to this because I see a publish date field for the Publication Status property there. Therefore I wonder if I can get that field by the api.
getting the last published date
hi everyone,
i am working on a .net control that shows the lastest 5 published content of the site. i can only get the createDate or the updateDate by the Node class.
how can i get the last published date of the nodes and sort them? do i need to do direct query to database or there are some class in the api that can help?
thanks in advance! :)
Hi Jackie
I don't know if it's possible to find the "last published/created date" in the database...but since it's possible to use rollback on nodes maybe there is someting to be found in the database that can be used. But don't know if it's a best practice or a good idea performance wise if it's possible.
I think I would make a custom date property on the document types and then hook in to one of the publish events to set the current date/time in that field so it gets updated every time the node is published.
I hope this makes sense.
/Jan
I agree that adding a new date property is the easiest way to implement the idea, and actually I did think of this before posting here, but I am curious if there is something build-in to to this because I see a publish date field for the Publication Status property there. Therefore I wonder if I can get that field by the api.
Anyway, thanks for your reply Jan :)
is working on a reply...