Creating Custom meta data that displays page status (Publish or Unpublish) | Community
Skip to main content
April 12, 2021
Solved

Creating Custom meta data that displays page status (Publish or Unpublish)

  • April 12, 2021
  • 1 reply
  • 1332 views

Hi there, we are using an external service for search and want to provide tons of meta-data info. One which includes the status of page content whether it is published or not. Since the service can't fetch the isActivated properties, we are creating a custom meta-data field that exposes the status of the page. Can this be done?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BrianKasingli

@manlosa,

When you think of the AEM content architecture, the public-facing AEM environment, which is the publish instances, would only store activated resources. Therefore if your external service is reading data from an AEM publish instances, they will never be able to see these unpublished resources. 

If however, your third party service is directly accessing your AEM author instance, then they will be able to retrieve every cq:Page node, and read the cq:lastReplicationAction attribute. Definetly I would review the external service API to understand what it is doing before thinking about using the AEM author as a data source, as in most cases are not best practice. 

And why are you allowing users to search your un-publish web pages? Unpublished pages are unpublished for a reason?

1 reply

BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
April 12, 2021

@manlosa,

When you think of the AEM content architecture, the public-facing AEM environment, which is the publish instances, would only store activated resources. Therefore if your external service is reading data from an AEM publish instances, they will never be able to see these unpublished resources. 

If however, your third party service is directly accessing your AEM author instance, then they will be able to retrieve every cq:Page node, and read the cq:lastReplicationAction attribute. Definetly I would review the external service API to understand what it is doing before thinking about using the AEM author as a data source, as in most cases are not best practice. 

And why are you allowing users to search your un-publish web pages? Unpublished pages are unpublished for a reason?

ManlosaAuthor
April 12, 2021

@briankasingli,

     With this solution, our audience is the content authors so this is why the data source is author. The 3rd-party service can not retrieve the value for "cq:lastReplicationAction" but it can retrieve values from the custom meta-data schema that we created.

This is why I thought of extending the custom schema and add a field called "Is Published" and display the value of "cq:lastReplicationAction". Something like this. And if I can somehow get a value of "True/False", then I think the 3rd-party service might be able to fetch.

Not really sure if there are other ways around this.

 

Thanks!