|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
traderookie Smarty n00b
Joined: 02 Jul 2011 Posts: 1
|
Posted: Sat Jul 02, 2011 12:55 am Post subject: {extends file="{$smarty.current_dir}/template.tpl" |
|
|
Hi all!
I used Smarty 3.08 and wanted to inherit a template for my template file via {extends file="{$smarty.current_dir}/template.tpl"}
The above used to work but ended with the error message:
Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "templateChild.tpl" on line 2 "{extends file="{$smarty.current_dir}/template.tpl"}" a variable file attribute is illegal' in /www/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:441
I hope someone can help! |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Sat Jul 02, 2011 8:43 am Post subject: |
|
|
This is a known issue. 3.08 (or 3.07?) restricted variables in the extends block, because Smarty cannot handle different inheritance paths from the same base template for you.
With Smarty 3.1 you can change that to {extends file="./template.tpl"} to achieve your goal |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|