Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jackie Lee 2 posts 22 karma points
    Feb 24, 2011 @ 06:09
    Jackie Lee
    0

    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! :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 24, 2011 @ 07:11
    Jan Skovgaard
    0

    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

  • Jackie Lee 2 posts 22 karma points
    Feb 24, 2011 @ 09:35
    Jackie Lee
    0

    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 :)

Please Sign in or register to post replies

Write your reply to:

Draft