Re: [SMARTY-DEV] Quick Question

From: Date: Tue, 25 Mar 2003 02:22:38 +0000
Subject: Re: [SMARTY-DEV] Quick Question
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1009@lists.php.net to get a copy of this message
From: "luis" <luis@fuegolabs.com> > Find and replace is not a nice option because it will force developers > to remember to write an awful if statement for each display, it's just > nasty. > > How can I do it extending the Smarty class? Use the code Monte posted earlier: class my_smarty extends smarty { function display($user, $tpl_file, $cache_id = null, $compile_id = null) { if($this->template_exists("$user/$tpl_file")) { parent::display("$user/$tpl_file") }else{ parent::display($tpl_file); } } }

« previous php.smarty.dev (#1009) next »