View Single Post
  #4  
Old 11-26-2002, 10:24 AM
 
derrick92130 derrick92130 is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: San Diego, California USA
Posts: 68
 

Default passing and assigning variables

I'm still not clear on why you can't use the value posted through the a href, but will focus no answering your question!

In category1.php you can assign $cat a value two different ways:

Code:
$cat = "1"; $smarty->assign("cat",$cat);

OR

Code:
$smarty->assign("cat","1");

I haven't done the latter, but should work fine.

I "believe" that the assign that you have been trying inside the .tpl will only remain as a local variable from within the .tpl itself. The only way to get it from the .tpl would be through a http post (standard html hidden variables) or by passing it as a parameter to the .php code call using the ? syntax originally discussed.

Does that help?
__________________
-Derrick
FreeRangeMinds, LLC
Reply With Quote