Answer the question
In order to leave comments, you need to log in
How to concatenate a string with a variable in SMARTY?
It is necessary to add slashes at the beginning and at the end when displaying the link ( catalog/{$cat->url} ).
To be something like this (php): var = '/'.catalog/{$cat->url}.'/'
Now the url is returned without the leading and trailing slash.
<a href="catalog/{$cat->url}" data-category="{$cat->id}">{$cat->name|escape}</a>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question