You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Smarty: Unable to load template file '/common/header.tpl' in '/var/www/webapp/test/module/Application/view/application/index/detail.tpl' <-- thrown in /var/opt/webapp/dom_rsv/vendor/SmartyModule/vendor/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 130
The text was updated successfully, but these errors were encountered:
I'm not sure, if this really is the same problem like yours, but I had trouble with relative includes, too.
I think one problem is that the template directory will be set to the current templates path.
e.g. if you render the template /index/detail.tpl the template path will be set to /index and then the relative path will result in being /index/common/header.tpl, which is not correct.
imho it should not set the template dir, but add all paths from the template path stack so Smarty can check all registered paths.
I will have my hands on this today and create a branch in my fork, perhaps you could check if my adjustment would fix your problem, too.
best regards
Matthias
maglnet
added a commit
to maglnet/SmartyModule
that referenced
this issue
Apr 29, 2015
I can't include tpl file with relative path.
{include file="/common/header.tpl"}
{include file="/common/input.tpl"}
When I do this I got error message.
Smarty: Unable to load template file '/common/header.tpl' in '/var/www/webapp/test/module/Application/view/application/index/detail.tpl' <-- thrown in /var/opt/webapp/dom_rsv/vendor/SmartyModule/vendor/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 130
The text was updated successfully, but these errors were encountered: