How can I find the date and time a document was first published?
Both the CreateDate and UpdateDate properties are not what I need to display, since the first may be some time before official publication, and the second may change (more than once) after official publication when correcting errors in the document.
I was thinking that I may inspect previous versions of the document for this, but as usual I have difficulty finding API documentation.
Not sure if you can access the different versions using the API (I'm not saying you can't, just that I'm not sure - not being a backend dev. myself).
But I'm thinking it perhaps would be easier to create a custom field under "properties" called "publishdate", which you populate with the date using an afterpublish event for instance and make sure that the value is only set the first time a node gets published...
How can I find the date and time a document was first published?
Both the CreateDate and UpdateDate properties are not what I need to display, since the first may be some time before official publication, and the second may change (more than once) after official publication when correcting errors in the document.
I was thinking that I may inspect previous versions of the document for this, but as usual I have difficulty finding API documentation.
Any tips?
Hi Michiel
Not sure if you can access the different versions using the API (I'm not saying you can't, just that I'm not sure - not being a backend dev. myself).
But I'm thinking it perhaps would be easier to create a custom field under "properties" called "publishdate", which you populate with the date using an afterpublish event for instance and make sure that the value is only set the first time a node gets published...
There is an overview of all events in Umbraco here: http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/overview-of-all-events
Hope my explanation makes sense :)
/Jan
Hi. I'm not sure, cause I haven't seen any more or less official doc to it, but it seems that
is going to emit what's required.
I will try that, thanks!
is working on a reply...