Re: [SMARTY] question about the dynamic %% directory in C:\
| From: | Monte Ohrt | Date: | Wed, 08 Jan 2003 19:10:45 +0000 |
| Subject: | Re: [SMARTY] question about the dynamic %% directory in C:\ | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7061@lists.php.net to get a copy of this message | ||
Use something from your $_GET string for the cache_id.
A quick 'n dirty way:
$smarty->display('index.tpl',$_GET);
But, this opens the possiblities of problems, to be safe only use the
portion of $_GET you need, check its contents & length, etc.
Monte
On Wed, 2003-01-08 at 12:58, Hoffman, Geoffrey wrote:
> I have started putting some dynamic SQL stuff into index.php in my first
> Smarty project. I have news stories in different sections, i want
> index.php?sec=1 to be 'news' stories, ?sec=2 to be sports stories, etc.
>
> What I have so far will work (e.g. the stories show up under the given
> section) but only if I trash the cache folder _after each get_ . In other
> words, my get param is only recognized if there's no cache; once the cache
> is created (for sec=2 or sports stories) all subsequent requests of
> index.php?get=anything gives me sports stories. If I trash the %% directory
> in C:\ then I can do sec=1 and get main section stories, but then it's
> 'frozen' in main section.
>
> i want to take advantage of caching where possible, but what code (and
> where) should i use to refresh using the value ($_GET) passed to index.php?
>
> Geoff Hoffman
> Web Designer/Programmer
> AZ Interactive Media Group
> Work: (480) 898-7730
> Cell: (480) 231-8323
--
Monte Ohrt <monte@ispi.net>