Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Publish Referenced Pages

Avatar

Level 2

Hello,

I am trying to publish a page with its referenced page. According to the docs there are multiple ways to do so. However, I am not getting any prompts when attempting to publish from page edit view. When I try through Manage Publication, I am not getting the "Published References" link.

I've tried two ways:

1. Including a page with the data-sly-resource statement in a component:

<sly data-sly-resource="${bannerModel.link @ wcmmode='disabled'}"/>

2. Using reference component:

Dropped a reference component from General group and specified a page to reference.

In both cases, referenced pages are not getting published. Is there a way AEM can publish them or should I write a custom implementation programmatically?

Thanks in advance.

5 Replies

Avatar

Level 8

The Asset references will identify automatically but when it comes to pages I think we need to manually publish all reference pages, I think the reason behind this is when some other content author is working on some other page and without approval using reference if you publish the same page to the live then it is going to be problem

You will see this option "Published References" only when there are references on the page, you can test this by adding some assets.

Avatar

Level 2

Thanks for reply, rajas66269496. In this particular case, the referenced page is tightly coupled with the page that references it and the requirement is to publish it along they way, since there is no chance that anyone will work on the referenced page in isolation.

Avatar

Community Advisor

While writing any custom logic just make sure that it is very specific to your project and doesn't affect other projects.

Avatar

Level 8

You need to write a custom workflow process and add that to the "Request for Activation" workflow, inside your custom workflow process get the current page path from the payload and find the referenced links either you can go and read each and every node and find out href links or you can write some query, get the links and using Replicate class you can programmatically replicate all reference pages

Check this to create a custom workflow process

https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html

I

Avatar

Level 5

dmitryp96795211

I think the functionality you're looking for is mentioned in [1].

In Touch UI, the page references are calculated only when a particular configuration, called the "WCM Authoring Content Reference Configuration" is configured to list the reference component in the OSGi configuration [1]. These references then start appearing under "Borrowed Content" in the reference rail.

Best Regards,

Aneet Arora

[1] Developing AEM Components