How to loop file includes with a path
| From: | Holger Bahr | Date: | Wed, 04 Apr 2001 16:39:09 +0000 |
| Subject: | How to loop file includes with a path | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-511@lists.php.net to get a copy of this message | ||
Hi,
how can i do includes like:
{section name=sidebar loop=$sidebar_content}
{include file=$sidebar_content/sidebar}
{/section}
but with providing an additional path like:
{section name=sidebar loop=$sidebar_content}
{include file="mytheme/".$sidebar_content/sidebar}
{/section}
hope you understand.
my array looks like:
$sidebar_content = array("sidebar" => array("mytheme/s001.tpl",
"mytheme/s001.tpl"));
and the assign:
$smarty->assign($sidebar_content);
Holger