Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block variation values in twig #178

Open
TheMaaarc opened this issue Feb 4, 2019 · 0 comments
Open

Block variation values in twig #178

TheMaaarc opened this issue Feb 4, 2019 · 0 comments

Comments

@TheMaaarc
Copy link
Member

Currently the variables that I can access through TWIG (in the administration) have always the value that was entered by the user, even if it is overwritten by the selected variation.

Example

If I write xyz in the variation-textfield of the TextBlock and then switch the BlockVariation to intro, I expect the variable accessible through TWIG ({{cfgs.variation}}) to be lead but it is xyz.

TextBlock::variations()
        ->add('lead', 'Intro')->cfgs(['variation' => 'lead'])
        ->register(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants