[SMARTY] {include} questions

Josh Trutwin <[email protected]> Thu, 23 Aug 2007 12:32:07 -0500
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
=46rom the docs:=20

"All assigned variable values are restored after the scope of the
included template is left. This means you can use all variables from
the including template inside the included template. But changes to
variables inside the included template are not visible inside the
including template after the {include} statement."

Is there any way for an included template to pass data back to the
template that includes it?  I have some included templates that do
something that I want the including template to know about.

My only thought was to use the assign attribute and parse the results
before displaying them - but that seems pretty ugly.

One last question - if you can "se all variables from the including
template inside the included template" what is the point of passing a
variable in like this:

{include file=3D'temp.tpl' foo=3D$bar}

Thanks,

Josh

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php