Answer the question
In order to leave comments, you need to log in
How to trim a variable in Smarty template code?
Hello! The site code contains the following construction:
I want to display the first 70 characters from it. Attempts to do through https://www.smarty.net/docsv2/ru/language.function... or so www.php.su/functions/?substr were unsuccessful.
How can I do that? <title>{$section_info.title}</title>
Answer the question
In order to leave comments, you need to log in
In Smarty, functions are applied through a vertical bar, parameters are specified after the function name, separated by a colon:{$section_info.title|mb_substr:0:70}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question