Re: OT: syntax advice please

From: Date: Tue, 30 Oct 2001 19:27:45 +0000
Subject: Re: OT: syntax advice please
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1772@lists.php.net to get a copy of this message
I'd go with the latter. Easier to maintain and more flexible. Peter Bowyer wrote: > > Hello, > > Sorry for the off-topic posting, i just can't think of anywhere else where > I could get an answer :-( > > I'm currently writing a few smarty_func_ things for use in a future > postcard application. And as usual, I've come up with two different > syntaxes for the boxes. I have the option of: > > {list_new_cards age=7 number=3} > or > {list_cards type="new" age=7 number=3} > > and > > {list_top_cards number=3} > or > {list_cards type="top" number=3} > > which in their shortest form would become: > {list_top_cards} > or > {list_cards type="top"} > > Which do you think would be easier to understand for the average HTML > programmer? The first syntax means two separate functions in > Smarty.addon.php whereas the second means only one function with a switch > loop in it. I can't decide whether two function is better than one or not, > but what really matters is which one is clearer. > > Any feedback gratefully received! > TIA, > Peter. > > -- > Devon Railway Centre - a great day out! > http://www.devonrailwaycentre.co.uk > > --- > You are currently subscribed to smarty as: monte@ispi.net > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

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