Re: [SMARTY-DEV] Bringing the {insert} functionality to other tags

From: Date: Thu, 05 Sep 2002 10:11:26 +0000
Subject: Re: [SMARTY-DEV] Bringing the {insert} functionality to other tags
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-263@lists.php.net to get a copy of this message
Hi all, nice to see, that caching is an issue again. i tried to discuss it some times before. 1. i like robertos idea with {!somefunction}...{/somefunktion} where the "!" tells smarty not to cache the content of the block. this is even stronger than {nocache}...{/nocache}. in my application i need this functionallity very urgend. as workaround i programmed a plugin insert.include.php which includes subtemplates without caching, but the problem is, that now one template needs to be broken into at least three or four. deciding caching or not in templates is much more powerfull than in the programm, although i understand, that designers don't want to have anything to do with it. but i think give them the possibility. nobody needs to use it. smarty will only become more powerful. 2. at the moment insert functionallity has a bug, if you have template-functions that call smarty->display() on their own. i have very much of them. this is because the $smarty->_cache_info variable becomes reset if you call display() or fetch(). so the generated cache/xyz.tpl.php gets a wrong cache-header viz without the information in $smarty->_cache_info['insert_tags']. i already posted a patch against smarty 2.3.0 on this list and in the wiki, but no one replyed. i will post it here again. here it is: 609a610,611 > if (isset($this->_cache_info)) $_cache_info = $this->_cache_info; > 658a661 > if (isset($_cache_info)) $this->_cache_info = $_cache_info; 661a665 > if (isset($_cache_info)) $this->_cache_info = $_cache_info; 705a710,711 > > if (isset($_cache_info)) $this->_cache_info = $_cache_info; thanks very much, rainer ps: i really like to help programming {!somefunction}...{/somefunction}, but i need a hint where to start.

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