I try to use this template code (for Node JS):
res.render('index', {fname: 'include.smarty'});
{include file="$fname"}
Result:
Error: ENOENT: no such file or directory, open 'C:\OSPanel\domains\express\partials\$fname'
If I use it like this:
{include file="include.smarty"}
Returns normal response.
What could be the problem when using variables in include?
I try to use this template code (for Node JS):
res.render('index', {fname: 'include.smarty'});{include file="$fname"}Result:
If I use it like this:
{include file="include.smarty"}Returns normal response.
What could be the problem when using variables in include?