Appending and prepending on a section?

From: Date: Tue, 30 Jul 2002 04:48:07 +0000
Subject: Appending and prepending on a section?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5503@lists.php.net to get a copy of this message
Hi, I wondered if there were a way to prepend and append something to a section? Let me give you all an example of what I think would be a good idea: (this is kind of a feature suggestion, unless there are other ways to achieve what I'm trying to do) --- {section name=somesection loop=$variable prepend="<ul>" append="</ul>"} <li>{$variable[somesection].name}</li> {sectionelse} There were no names! {/section} --- What I want to do is to only prepend and append something to the actual section (not the sectionelse). And yes, I know the prepend and append properties is non existent, I just wanted to show you how I would like it to be. I could just put <ul> and </ul> before and after the section, but because I don't want the "There were no names!" message inside those tags. I can't put them inside the section either, because then there would be created new <ul>'s every time it iterates through the array. I don't want to have {if}'s for checking wether or not to display the <ul>'s either. How can I achieve what I want to do? Thank you for your help! Best regards, Håvard Lindset kBase Developer http://www.webpixels.net http://kbase.webpixels.net

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