This is my setup. My URL my-site/index.php/group/template-x
Template-x must call two different pieces of code. I want that to happen by using the third segment, which shall be NL or BE. So my-site/index.php/group/template-x/NL or my-site/index.php/group/template-x/BE.
The two pieces of code are stored as Stash Templates. The names are consumenten-NL.html and consumenten-BE.html. I can show the code by calling them hard coded,
like {stash:embed:registration:consumenten-NL}
but I want to use segment_3
dynamically.
In template-x I can grab segment-3.
{exp:stash:set name="segment-3"}{segment_3}{/exp:stash:set}
and show it in the template
{exp:stash:get name="segment-3"}
Now calling the embeds in template-x:, I do not seem to be able to do this:
{stash:embed:registration:consumenten-{exp:stash:get name="segment-3"}}
gives
error
Stash: the file "../stash_templates/registration/consumenten-M40o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr.html" was not found.
I tried several other methods, but the documentation is too high for me, so I ask for a little assistance here. Much appreciated.
Thanks.