I want to render a particular component variant based on context data
See original GitHub issueI am managing multiple brands and want to be able to load or a variant of a different brand throughout my components.
I have a bunch of links that are contained in the polling component
{{render '@o-aem-footer-social-links' pageContext merge=true}}
But I’d like to be able to load a specific retailer variant based on “retailer” context data like
{{render '@o-aem-footer-social-links--{{retailer}}' pageContext merge=true}}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to create visual variants for React components using ...
To get a different variant, a different component needs to be rendered vs changing a property on the same component which might be...
Read more >Create a rendering variant - Sitecore Documentation
In the Content Editor, click the site and open the Presentation/Rendering Variants folder. · Right-click the rendering that you want to add the ......
Read more >In SXA, rendering variant - need to generate context item url
I have a list of item and by using reference variant, I'm able to loop the items with the multi-list values.
Read more >Variants - Fractal
Creating file-based variants Each variant can then have its own markup, and by default will be rendered with whatever context data is defined ......
Read more >Context - React
Context. Context provides a way to pass data through the component tree without having to pass props down manually at every level.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A lookup helper might work better here, see here: https://github.com/frctl/fractal/issues/278#issuecomment-316977660
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.