luya-module-cms icon indicating copy to clipboard operation
luya-module-cms copied to clipboard

Block variation values in twig

Open TheMaaarc opened this issue 6 years ago • 0 comments

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(),

TheMaaarc avatar Feb 04 '19 13:02 TheMaaarc