Re: [SMARTY] Basic question about insert

From: Date: Wed, 16 Jul 2003 22:27:57 +0000
Subject: Re: [SMARTY] Basic question about insert
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9910@lists.php.net to get a copy of this message
On Wed, Jul 16, 2003 at 08:23:48PM +0200, Luc Saint-Elie wrote: > Hello, > > I have a smarty little app with $smarty->cachiing=true; > > On the front page I want to display a specific greeting sentence if the > user comes from a search engine so I did : > > 1- a insert_Greetings($comefrom) function that returns a greeting sentence > based on the search engine name (detected from $_SERVER['HTTP_REFER'] > This function is in a separate file included in my index.php file > > 2 in my template : > {insert name="getGreeting" comefrom=$smarty.server.HTTP_REFERER} "$smarty.server.HTTP_REFERER" is cached also (all parameters to insert a cached). this means getGreeting always uses the same value. remove the parameter from the {insert}-tag and use $_SERVER['HTTP_REFERER'] inside your getGreeting-function instead. HTH messju > This doesn't work. > The same fucntion used in a classical way without caching enabled works > well so its not a HTTP_REFER detection problem > > Where did I do wrong ? > > Luc > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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