Re: Template class

From: Date: Tue, 11 Dec 2001 13:04:24 +0000
Subject: Re: Template class
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3450@lists.php.net to get a copy of this message
doesnt it finally come down to replacing a block with a 'foreach' ? so why learn something new, leave the 'foreach' there, or is something else always easier? it would also be easy for me to change my code this way that you can use this in the template {section name="foo" loop="$foo1"} {$foo1[foo].foos_property} {/section} its just a filter with some 'preg_replace' but what's the advantage? what i see as a true advantage of smarty for example are its modifiers {$word|truncate:20:"..."} might be good to understand for a designer but again, a simple filter would do it too, which simply translates this in to a if ( strlen($word) >20 ) { $word = substr($word,0,20) . "..."; } -- Wolfram

« previous php.pear.dev (#3450) next »