Re: [SMARTY] How do I include HTML attributes in $CONTENT?
| From: | Roman Neuhauser | Date: | Thu, 15 Aug 2002 10:12:42 +0000 |
| Subject: | Re: [SMARTY] How do I include HTML attributes in $CONTENT? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5726@lists.php.net to get a copy of this message | ||
> Date: Wed, 14 Aug 2002 15:08:10 -0500
> From: "Eric C. Pollitt" <eric@globalhemp.com>
> To: <smarty-general@lists.php.net>
> Subject: [SMARTY] How do I include HTML attributes in $CONTENT?
> In PHP Fast Template I did the following:
> $tpl->assign('AUTHOR', 'Tim Adams, The Observer'); ?>
> <P CLASS="size2">Sunday, January 20, 2002</P>
> <?php pageFinish(); ?>
> However, in Smarty I can't as easily include unadulterated HTML code as
> follows:
> $smarty->assign("AUTHOR", "Tim Adams, The Observer");
> $smarty->assign("CONTENT", "<P CLASS=size2>Sunday, January 20,
> 2002</P>");
> $smarty->display('/home/globalhemp/www/Smarty/templates/index.tpl');
> So, is there a way to make this aspect of Smarty work like PHP Fast
> Template? I understand that this is a simple example, but I have a few
> thousand pages like this with obviously more that one like of HTML content.
1) why do you use a template engine if you have your html in the
code, not in the templates?
2) just escape the quotes (http://www.php.net/manual/)
--
FreeBSD 4.6-STABLE
12:09PM up 6 days, 4 mins, 18 users, load averages: 0.04, 0.03, 0.00