Re: [SMARTY-DEV] idea
| From: | messju mohr | Date: | Thu, 28 Aug 2003 17:41:23 +0000 |
| Subject: | Re: [SMARTY-DEV] idea | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-1826@lists.php.net to get a copy of this message | ||
with http://smarty.php.net/manual/en/template.resources.php
or http://smarty.php.net/manual/en/language.function.eval.php
In-Reply-To: <3F4E3E5C.4040609@fireserve.net>
On Thu, Aug 28, 2003 at 10:39:40AM -0700, Dennis Gearon wrote:
> 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
> >
> >
> >
> >
> >
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php