AW: [SMARTY] Help in <can't describe it> appreciated

From: Date: Sun, 23 Feb 2003 22:25:34 +0000
Subject: AW: [SMARTY] Help in <can't describe it> appreciated
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8139@lists.php.net to get a copy of this message
Thanks a lot for your help Jason, I already had a static version of it, what I needed was a dynamic one - messju showed me the trick - but nevertheless, I really thank you for such a response! Greets, Joscha > -----Ursprüngliche Nachricht----- > Von: Jason Sweat [mailto:sweatjejm@mchsi.com] > Gesendet: Sonntag, 23. Februar 2003 04:53 > An: Joscha Feth; smarty-general@lists.php.net > Betreff: Re: [SMARTY] Help in <can't describe it> appreciated > > > php: > $t = new Smarty; > > $d = array( > 2 => array( > 'enums' => array(6 => 'blue',5 => 'yellow',7 > =>'red') > ,'name' => 'color' > ) > ,11 => array( > 'enums' => array(15 => 'polyester',13 => 'cotton') > ,'name' => 'material' > ) > ,1 => array( > 'enums' => array(9 => 'S',8=>'M',11=>'L', > 10=>'XL') > ,'name' => 'size' > ) > ); > $t->assign(array( > 'mat' => $d[11] > ,'col' => $d[2] > ,'siz' => $d[1] > )); > $t->display('test.tpl'); > > template: > <table border="1"> > {foreach from=$mat.enums item=cur_mat key=key_mat name=mat} > {if $smarty.foreach.mat.first} > <tr><th colspan="2">{$mat.name}</th></tr> > {/if} > <tr valign="top"><td>{$key_mat} => {$cur_mat}</td> > <td><table border="1"> > {foreach from=$siz.enums item=cur_siz key=key_siz name=siz} > {if $smarty.foreach.siz.first} > <tr><th colspan="2">{$siz.name}</th></tr> > {/if} > <tr valign="top"><td>{$key_siz} => {$cur_siz}</td> > <td><table border="1"> > {foreach from=$col.enums item=cur_col key=key_col name=col} > {if $smarty.foreach.col.first} > <tr><th colspan="2">{$col.name}</th></tr> > {/if} > <tr valign="top"><td>{$key_col} => {$cur_col} > {/foreach} > </table> > </td></tr> > {/foreach} > </table> > </td></tr> > {/foreach} > </table> > > ----- Original Message ----- > From: "Joscha Feth" <joscha@feth.com> > To: <smarty-general@lists.php.net> > Sent: Saturday, February 22, 2003 12:05 PM > Subject: [SMARTY] Help in <can't describe it> appreciated > > > > Please read here, I put together a small description of my > problem - all > > thoughts, ideas, advises, better methods, etc. appreciated > (I am nearly > > getting crazy with this thing) > > > > http://www.feth.com/uploads/case_study1.html > > > > Greets, > > Joscha > > > > > > > > -- > > Smarty General Mailing List (http://smarty.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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