|
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 |
ndorphin Smarty Rookie
Joined: 24 Dec 2009 Posts: 15 Location: Berlin, Germany
|
Posted: Sun Jan 29, 2017 11:59 pm Post subject: sub template variable scoping problem |
|
|
Hi Uwe,
Up to 3.1.29 the following code display true, 3.1.30 returns false. Seems the scope=parent is not working on sub/sub templates. Hope it's a bug and not a feature.
best
ndorphin
main.tpl
{include file='sub.tpl' scope=parent}
{if $foo}true{else}false{/if}
sub.tpl:
{include file='sub2.tpl' scope=parent}
sub2.tpl:
{$foo=true} |
|
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
|