Jump to content

How do I pass variable to media function in templates


Go to solution Solved by Sonya*,

Recommended Posts

{{$selectIcon = "icons/select-" . $selectLogoSize . ".svg";}}
<img src="{media="{$selectIcon}"}" />

That's how my code looks like, but for some reason, second line doesn't work. But if I remove the variable and manually enter the path as static, it works. How do I fix it?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...