question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I want to render a particular component variant based on context data

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dkhuntrodscommented, Jul 21, 2017

A lookup helper might work better here, see here: https://github.com/frctl/fractal/issues/278#issuecomment-316977660

0reactions
stale[bot]commented, Jul 12, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found