Re: [SMARTY-DEV] urgent: Passing PHP variables in SMARTY

From: Date: Wed, 11 Feb 2004 17:52:26 +0000
Subject: Re: [SMARTY-DEV] urgent: Passing PHP variables in SMARTY
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2101@lists.php.net to get a copy of this message
On Wed, 2004-02-11 at 09:54, Muhammed Mamedov wrote: > Hi everybody! > > I have a big problem here... > I have a web site in PHP and want to convert it into SMARTY style. > > I have calls like this in my main file (old one, with no SMARTY): > main.php?lang=en&cn=1 > > How can I catch this variables in my template? > > I tried this and it didn't work: > index.php (SMARTY based) > $smarty->assign("portal",$lang); $_GET['lang'] would contain your value from the URL for sure. $lang might or might not have it depending on your globals setting and your context. You need some basic training in PHP before you tackle Smarty.

« previous php.smarty.dev (#2101) next »