How do I include HTML attributes in $CONTENT?

From: Date: Wed, 14 Aug 2002 20:08:10 +0000
Subject: How do I include HTML attributes in $CONTENT?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5712@lists.php.net to get a copy of this message
I have previously been using PHP Fast Template for my new website and am "upgrading" to Smarty and have come into a bit of a problem with HTML attributes. In PHP Fast Template I did the following: ---------------------------------------------------------------------------- <?php require('/home/globalhemp/www/templates/prepend.php'); ?> <?php pageStart('Daydream believers'); ?> <?php $tpl->assign('DESCRIPTION', 'Rosemary shampoo, organic babyfood, hemp combats... a walk down the aisle of your local supermarket reveals how yesterday&#146;s long-haired idealists have made hippies of us all. Tim Adams meets the alternative millionaires who&#146;ve changed their bank balances by trying to change the world'); $tpl->assign('KEYWORDS', 'health-food, company, organic food, fraser, health food, people, business, daydream believers, shoes, rechelbacher, world, sense, food, spirit, health, idea, stores, daydream, believers, work, wanted, organic'); $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: ---------------------------------------------------------------------------- <?php require '/home/globalhemp/www/Smarty/Smarty.class.php'; require '/home/globalhemp/www/Poll/booth.php'; $smarty = new Smarty; $smarty->compile_check = true; $smarty->debugging = false; $smarty->assign("TITLE", "Daydream believers"); $smarty->assign("DESCRIPTION", "Rosemary shampoo, organic babyfood, hemp combats... a walk down the aisle of your local supermarket reveals how yesterday&#146;s long-haired idealists have made hippies of us all. Tim Adams meets the alternative millionaires who&#146;ve changed their bank balances by trying to change the world"); $smarty->assign("KEYWORDS", "health-food, company, organic food, fraser, health food, people, business, daydream believers, shoes, rechelbacher, world, sense, food, spirit, health, idea, stores, daydream, believers, work, wanted, organic"); $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. Thanks, Eric C. Pollitt, Founder 401 E. Illinois Ave. Peoria, IL 61603 Global Hemp - Portal to the hemp community http://www.globalhemp.com/ Create like a god. Command like a king. Work like a slave! -- Constantin Brancusi

« previous php.smarty.general (#5712) next »