smarty icon indicating copy to clipboard operation
smarty copied to clipboard

New Smarty Variable or asset

Open jd19007 opened this issue 3 years ago • 1 comments

in smarty_internal_compile_private_special_variable.php version 4.04 could you add something like this.

` case 'template_path':

                return 'str_ireplace($_SERVER["DOCUMENT_ROOT"], "", str_ireplace($_smarty_tpl->source->name, "", $_smarty_tpl->source->filepath))';`

This will help to return something like /templates/default main case will be to include like css files or something of that nature or could we get a function called asset with path and if multiple templates are selected the one that has it will win and return /templates/default2/media/css/test.css if not in default2 it will return something like /templates/default/media/css/test.css usage would be asset('/media/css/test.css').

jd19007 avatar Jan 18 '22 12:01 jd19007

Sorry, I can't follow you. Is there a problem you are trying to fix?

wisskid avatar Feb 15 '22 20:02 wisskid

Closed because of inactivity.

wisskid avatar Jan 31 '23 10:01 wisskid