Question regarding use and retrieval of tags from content fragments and onto the page properties. Currently, our tags are added on the page property level of each of our templates – this feeds into the data layer, meta properties etc.
Future state: Want to populate components using tags at the component level, in this case, the content fragment level. Is it possible to expose the content fragment tags into tag fields of the page properties of our page for authors without duplicating tags and in order to avoid authors re-tagging content fragments?
Solved! Go to Solution.
Views
Replies
Total Likes
Tagging to the CF by authoring once. Adding the tags to the page from the tags associated with the CF is programmatically automated. Because OOTB there is no way to achieve it. So you need to implement some custom logics.
Hi @gdWebct
While avoiding the difficulty of duplicate and redundant author tagging, it is possible to expose content fragment tags into tag fields at the page properties level. The Adobe Experience Manager (AEM) ecosystem's strategic modifications and seamless integration can be used to achieve this.
Here's a high-level outline of the steps you can take to achieve this future state:
By following these steps, authors can choose a content fragment along with its associated tags at the component level, and this data will be used to populate the tags in the page properties. This approach ensures that tags are managed at the content fragment level and avoids duplication or the need for authors to manually re-tag content fragments on the page level.
Thank you, @AsifChowdhury appreciate the detailed response.
@AsifChowdhury let's not mark this as accepted, yet, if you don't mind...if tagging at the cf but then again tag on page properties how are we avoiding tagging twice?
Tagging to the CF by authoring once. Adding the tags to the page from the tags associated with the CF is programmatically automated. Because OOTB there is no way to achieve it. So you need to implement some custom logics.
This should be pretty simple for your developers to achieve for you. If your AEM implementation is reasonably up to date, the list of tags displayed on your site are being fetched from the Page sling model (java class) that backs all of your pages. By default (if using WCM Core, but also in most custom implementations as well) this will be fetching the list of tags from the Page Properties, which is what you're seeing. Your developers can override this function to also review all components on the page being rendered, pull in the tags from those components, and then create a list of unique tags from the Page Properties + Components/Content Fragments.
tl:dr; just a little bit of custom coding required, but should be able to be achieved by just updating a single sling model.
Thank you for breaking it down, @BrettBirschbach !