dealing with links...

From: Date: Wed, 26 Feb 2003 21:57:05 +0000
Subject: dealing with links...
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8232@lists.php.net to get a copy of this message
This might be kinda dumb, but I've always wondered how other people deal with linking to other pages. Do you keep the data in the php script and build the link there, or do you assign all the data to variables and build the link inside the template?? Here's two examples of what I'm talking about: <?php $smarty->assign('link',"http://www.blah.com?id=$id&action=$action") $smarty->display('index.html') ?> Template: <A HREF="{$link}">click here</A> ---OR----- <?php $smarty->assign('id',$id) $smarty->assign('action',$action) $smarty->display('index.html') ?> Template: <A HREF="http://www.blah.com?id={$id}&action={$action}">click here</A> Thanks... I sometimes mix the two methods as they both have their pros and cons. I just wanted to get a feel for what everyone else uses. Thanks, Ajay

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