Re: How to loop file includes with a path
| From: | Andrei Zmievski | Date: | Thu, 05 Apr 2001 16:28:57 +0000 |
| Subject: | Re: How to loop file includes with a path | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-512@lists.php.net to get a copy of this message | ||
On Wed, 04 Apr 2001, Holger Bahr wrote:
> 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);
Why do you want to prepend "mytheme" to $sidebar_content/sidebar if it
already contains "mytheme"?
-Andrei