Re: [SMARTY-DEV] idea

From: Date: Thu, 28 Aug 2003 17:39:40 +0000
Subject: Re: [SMARTY-DEV] idea
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1823@lists.php.net to get a copy of this message
OK, This is what I need to do, how does everyone else do it? ====================================== I have a basic template: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>{$title}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8> </head> <BODY BGCOLOR="#ffffff" background="{$images_path_root}rsrcs/images/al-anon/area.gif"> {$center_content} </body> </html> notice the images_path_root smarty var. ====================================== In a file USING this template, I have this: $tpl_engine = new Smarty; $content = "<IMG SRC=\"{$images_path_root}rsrcs/images/al-anon/remblem.gif\" BORDER=\"0\"> A comment about the image."; $tpl_engine->assign( $content ); $tpl_engine->display( $template_above ); ====================================== Of course, the smarty var '{$images_path_root}' in the assigned center content does not get replaced. How does one do this? Then Wom.bat wrote:
On Thursday, August 28, 2003 6:10 PM +0200, Dennis Gearon wrote:
Most of my classes that generate text, have two functions to do it: A/ Return the text. B/ Output it to the browser. Does smarty have a way to [return text] instead of sending it to the browser?
http://smarty.php.net/manual/en/api.fetch.php David


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