Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [SMARTY] {include} questions
Actually it depends on how you render the templates, for example in
http://www.dinahosting.com -a 100% smarty site- since the inner template is
rendered first it can setup variables or modify what I call world objects.
Actually, teh best way to show a hierchaly constructed page is to parse
first the inner stuff until you've finally the full page constructed.


On 8/23/07, Josh Trutwin <josh@trutwins.homeip.net> wrote:
>
> From the docs:
>
> "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='temp.tpl' foo=$bar}
>
> Thanks,
>
> Josh
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Vicente Werner y Sánchez

Report this thread to moderator Post Follow-up to this message
Old Post
Vicente Werner
08-24-07 12:16 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:05 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.