Re: [SMARTY] Additional identifier needed
| From: | Monte Ohrt | Date: | Wed, 01 May 2002 17:55:14 +0000 |
| Subject: | Re: [SMARTY] Additional identifier needed | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3958@lists.php.net to get a copy of this message | ||
Why not combine them to form a single cache id?
$smarty -> fetch ($template, $block_id.$cache_id);
$smarty -> clear_cache ($template, $block_id.$cache_id);
Norbert Röcher wrote:
Hi, im doing a block based CMS, using smarty. While i'm using one master-template to include several "blocks" i'm in need for an additional, separated template-identifier, which just should contain a numeric ID to be able to clear cached templates from a specified page/block id. The new identifier should be used as a name indicator for a container-directory for compiled/cached files (which still use the standard-cache-id). Easy example: $block_id = 8; $template = 'user/moduleName/blocktype/standard'; $language = 'en'; $usergroup = 'anon'; $cache_id= $language.'/'.$usergroup; Fetch/Display: $block = $smarty -> fetch ($template, $block_id, $cache_id); Clear cache: $smarty -> clear_cache ($template, $block_id); ... $smarty -> clear_cache ($template, $block_id, $cache_id); should work also. Any suggestions to do this? Norbert-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.