Using variable on smarty tag name

Hello,

I’m trying to use a variable name to create new snippets, something like this:

{s namespace=„frontend/detail/config_variant“ name=$variant_group}{/s}

But it doesn’t work. I have tried different combinations and none have worked so far. Can this be generated dinamically?

Thanks