include from section
| From: | Ivan Voras | Date: | Sun, 12 Jan 2003 17:35:22 +0000 |
| Subject: | include from section | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7135@lists.php.net to get a copy of this message | ||
I'm trying to include files whose filenames are stored in a database. The
obvious way (at least to me...) would be:
{section name=x loop=$y}
{include file=$y[x].filename}
{/section}
But this (in many variations) only causes various error messages, or even
garbage to be generated. Errors happen even when the $y variable above is
empty (an empty array), so it looks like the {include...} is not validated
like a normal part of a script, but it is pre-processed (?).
Is it possible to do something like the code above in Smarty?
--
--
Do not meddle in the affairs of sysadmins, for they are quick to anger and
have not need for subtlety.