|
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 |
salebab Smarty Rookie
Joined: 01 Dec 2010 Posts: 5
|
Posted: Wed Dec 01, 2010 11:25 am Post subject: Include statement with multiple lines |
|
|
Hello,
This seems to be an bug in smarty3, because it works fine in smarty2.
Code: |
{include
file="header.tpl"
seoTitle="test"
useJs=1
}
|
I'm getting this error:
Quote: |
SmartyCompilerException: Syntax Error in template "tpl\index/index.tpl" on line 17 " }" - Unexpected " }", expected one of: "}" , " " in C:\xampp\htdocs\project\inc\smarty3\sysplugins\smarty_internal_templatecompilerbase.php on line 423 |
|
|
Back to top |
|
FunFactor Smarty Rookie
Joined: 30 Nov 2010 Posts: 5
|
Posted: Wed Dec 01, 2010 12:04 pm Post subject: |
|
|
My first guess is that it has to do with the new $smarty->auto_literal which automatically treats a { or } as a literal one if it's surrounded by whitespace. You could try setting $smarty->auto_literal = false. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Dec 01, 2010 4:42 pm Post subject: |
|
|
Yes, this is related to the auto_literal. Set auto_literal = false or
Code: | {include
file="header.tpl"
seoTitle="test"
useJs=1} |
|
|
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
|