Is it possible to retrieve a value from a template
| From: | LPA | Date: | Sat, 08 Feb 2003 04:18:04 +0000 |
| Subject: | Is it possible to retrieve a value from a template | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7581@lists.php.net to get a copy of this message | ||
Hi,
I'm new with Smarty and here is my problem.
I have pages wich can contain (or not) blocs. These blocs are others templates.
Each blocs need some sql commands. I dont want to execute all sql commands before display each
page...
for example, i'd like to do :
$page = new Smarty;
if ($page->Is_Bloc("index.tpl","bloc1")) {
$sql="select .....
....
$page->Assign(..)
}
Thanx for your help
Laurent