-1

We have requirement to get the Last Published Date of Component in tridion DXA 1.2

Is there any DXA OOTB method to get the LastPublishedDate from Broker DB?

2

2 Answers 2

1

I would advise you not to get information directly from the Items table of the Content Delivery database. It is not supported and the database structure may be changed at any time (e.g. with a hotfix or version update). There is a supported API for retrieving Content Delivery data and metadata.

To find the last publication date of a page, obtain it's system metadata using the PageMetaFactory class. There is also a ComponentMetaFactory class which can give you the system metadata for components, including the last publication date, but I don't remember whether this is applicable to all components or only those which have been published using a dynamic component template.

0

It's not a supported solution to get data directly from the database - you would be best advised using the supported APIs.

Have you tried anything in the API such as

PageProvider.GetLastPublishedDateByUri(page.Id) 

or the solution presented on TREX already?

Are you using DCPs? Read around/test when the publish date is updated - e.g. when published as a DCP and/or as a static CP on a page.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.