Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Umbraco 7 - How do I get the published date from IPublishedContent?

I am having trouble finding the published date. I working the Umbraco.Core.Models.IPublishedContent interface, which doesn't seem to have a published date, only a created and updated date.

All the docs I found on the interwebs, suggest using Document(id), then Document.ReleasedDate, but this now marked obsolete. It suggests to use the ReleaseDate in Umbraco.Core.Models.Content class.

What am I missing?

like image 881
Prabu Avatar asked Oct 22 '25 15:10

Prabu


1 Answers

Use the UpdateDate on IPublishedContent. That date is always updated when you publish content.

The ReleaseDate that you mention is used to set a future date and time for when a specific content item should be published (automatically). So that is not the date you are after. When a release date is set the UpdateDate will also be updated with this date once the item is published.

like image 93
sitereactor Avatar answered Oct 24 '25 07:10

sitereactor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!