Re: [SMARTY] Different Blocks

From: Date: Mon, 11 Nov 2002 12:27:12 +0000
Subject: Re: [SMARTY] Different Blocks
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6391@lists.php.net to get a copy of this message
The example I posted here might help http://marc.theaimsgroup.com/?l=smarty-general&m=103050341614875&w=2 I assemble the content "blocks" into an array, then have a main layout template that loops over the array. I use caching for parts of the content, but none for the layout template. HTH Jason ----- Original Message ----- From: "Reto Hugi" <retohugi@gmx.ch> To: <smarty-general@lists.php.net> Sent: Monday, November 11, 2002 6:01 AM Subject: [SMARTY] Different Blocks > Hi, > > I read a lot about how to handle blocks with smarty in the archive of > this mailinglist, but none of those solutions seems to work for me - or > maybe i just got stuck to the wrong approach - that's why i'm asking > here. (BTW: Please excuse my english) > > What it's all about: > - one template with content > - a content can have text, code, forms etc. > could look like that: > <content> > <text /> > <code /> > <text /> > <text /> > <form or something else /> > <code /> > </content> > > Other template-engines use "blocks" to generate html and paste > everything together in the right sequence. > > I thought about using Smartys "section" together with some if clauses > (i.e. go through the array, if there is text, do the text block, if > there is code, do the code block etc). > Or maybe I should start another instance of smarty and do a fetch() for > blocks - but that's probably not really the idea of OOP and Smarty... > > I would be very glad if someone could help, or at least point me into > the right direction - think I got lost somewhere... :-/ > > Bye, > Reto > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.smarty.general (#6391) next »