Hi All,
We are planning add structured data on AEM pages and exploring options in AEM as well as looking for best practices to implement in AEM. Please provide your inputs.
Solved! Go to Solution.
Views
Replies
Total Likes
You can try multiple ways:
Option 1 : Add new text area filed called in page properties and where content author can directly add the json LD script. You can also add check box to enable or disable structured data (optional)
something like as shown below.
Option 2: As @BrianKasingli mentioned, you can even try with Experience Fragments.
Hope this helps you.
@SonuR1 You can create structured data using the content fragment model in AEM.
below are some references you should refer to get better clarity on CFs and accordingly you can make a decision on your use case.
https://one-inside.com/aem-content-fragments-vs-experience-fragments/
Thanks for the reply @Nitin_laad
Yea, content fragment is one of the options where we can define the fields required for structured data. Once we take the input from authors, Do you suggest to generate the JSON-LD programatically and store at node level?
Hi @SonuR1 You can easily get json from content fragment using model.json selector.
ex -
JSON Exporter for Content Services | Adobe Experience Manager
Adobe Experience Manager Content Fragments Support in Assets HTTP API | Adobe Experience Manager
I do not know your use case hence not sure why are you exploring JSON-LD.
My input is, you can use a Experience Fragments strategy to add reusable-structured-data in your AEM pages.
Thanks for the reply @BrianKasingli
May be I've the same question with experience fragments as well
As per my understanding, we need to add JSON-LD script with in <head> tag at the page level. So I'm looking for options how we can provide feature for authors where can they can just add data and backend generate script and load at the page level.
1. We want to avoid authors to take care of the script if possible.
2. exploring options as shown in below example where authors do not worry about the script.
https://simplifiedsearch.net/structured-data-generator/
3. Is there a way integrate API to generate Script dynamically.
4. If we can generate script dynamically or in the worst case assume author takes care of preparing script. in this case, what is the best options to load the script at the page level. etc..
"As per my understanding, we need to add JSON-LD script with in <head> tag at the page level. "
JSON-LD can be in head or body. Perhaps AEM has it's own peculiarity as to where it needs to go though?
You can also manually add it into the freeform area in the meta data area if you have that configured, but that would be for manually adding it, not automating.
Views
Replies
Total Likes
You can try multiple ways:
Option 1 : Add new text area filed called in page properties and where content author can directly add the json LD script. You can also add check box to enable or disable structured data (optional)
something like as shown below.
Option 2: As @BrianKasingli mentioned, you can even try with Experience Fragments.
Hope this helps you.
Hi @Siva_Sogalapalli ,
In my case i have a breadcrumb component which will generate breadcrumb. I need to add JSON-LD schema to some pages and the data in that schema will be dynamic, means whenever you open any page from that page who need to pick up your breadcrumb data.(url and title, max 3). I need to fetch the url and title from breadcrumb and need to pass it to the schema.
I am not sure how to get the data from breadcrumb and pass to schema.
and where that schema i should add?
I don't want to make the changes in existing code or component.
Is there any way to do it
@SonuR1 @egirl is your query resolve?
Views
Replies
Total Likes