Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

sub template variable scoping problem

 
Post new topic   Reply to topic    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
ndorphin
Smarty Rookie


Joined: 24 Dec 2009
Posts: 15
Location: Berlin, Germany

PostPosted: Sun Jan 29, 2017 11:59 pm    Post subject: sub template variable scoping problem Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP