Hi All,
I am trying to implement some components which reads common page property and resolve a referenced content fragment and read data from it which again is shared across many components on page. To solve this problem, I can think of below approaches.
If anyone has experience and have used these and also have some sample code, they can share would be great.
Thank you for your help.
Thanks,
Shehjad
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @shehjadk07
Using BindingValueProvider or BindingValueProviderByContext is a great solution for sharing common data across components. It improves performance by avoiding redundant data fetches and simplifies the HTL code. I recommend testing it in your environment to ensure it meets your performance and maintainability standards.
idea behind the BindingValueProvider is to expose common data, such as page properties or content fragment data, as bindings in your HTL templates, making it globally accessible
BindingValueProvider, introduced in ACS AEM Commons, that supports providing context-aware bindings (like page context, resource context, etc.). It’s an even better fit when you need different bindings for different contexts (e.g., author vs publish environment).
Hi @shehjadk07
Using BindingValueProvider or BindingValueProviderByContext is a great solution for sharing common data across components. It improves performance by avoiding redundant data fetches and simplifies the HTL code. I recommend testing it in your environment to ensure it meets your performance and maintainability standards.
idea behind the BindingValueProvider is to expose common data, such as page properties or content fragment data, as bindings in your HTL templates, making it globally accessible
BindingValueProvider, introduced in ACS AEM Commons, that supports providing context-aware bindings (like page context, resource context, etc.). It’s an even better fit when you need different bindings for different contexts (e.g., author vs publish environment).
Thank you @abhishekanand_ do you have any sample code to show the context aware binding
Views
Replies
Total Likes
Views
Likes
Replies