I have a property (hideBreadcrumb) that's been declared in ui.apps/src/main/content/jcr_root/apps/berkeley/components/page/base-page/basic-tab/.content.xml
I have a header.html that's located in ui.apps/src/main/content/jcr_root/apps/berkeley/components/page/base-page. Inside this html file, I can access the value for hideBreadcrumb.
If I try to access hideBreadcrumb from another section of my page (example: ui.apps/src/main/content/jcr_root/apps/berkeley/components/navigation-section/navigation-section.html), it's not working.
Any ideas on how it can be done? Thanks
Solved! Go to Solution.
Please have a look at this thread:- How do I get the value of a property given an absolute path?
//You use the JCR API to get node prop values. See this article to learn how to work with AEM and the JCR API: Adobe Experience Manager Help | Programmatically Accessing Adobe Experience Manager Content using th...
Also,
See How to access component properties from a Java Class
// I would say from to use as much as you can the ValueMap-approach.
Page page = currentPage;
ValueMap props = page.getContentResource("componentName").adaptTo(ValueMap.class);
String title = props.get("jcr:title", "default value");
And
This Read out and use node parameters from other components via JS Use API
Please have a look at this thread:- How do I get the value of a property given an absolute path?
//You use the JCR API to get node prop values. See this article to learn how to work with AEM and the JCR API: Adobe Experience Manager Help | Programmatically Accessing Adobe Experience Manager Content using th...
Also,
See How to access component properties from a Java Class
// I would say from to use as much as you can the ValueMap-approach.
Page page = currentPage;
ValueMap props = page.getContentResource("componentName").adaptTo(ValueMap.class);
String title = props.get("jcr:title", "default value");
And
This Read out and use node parameters from other components via JS Use API
As long as you know the relative/absolute path in JCR where that property gets stored, you can read it.
Thanks
any chance you can share a full sample code? thanks!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies