RE: [SMARTY] Nested Includes not working
| From: | Hoffman, Geoffrey | Date: | Thu, 02 Jan 2003 15:58:16 +0000 |
| Subject: | RE: [SMARTY] Nested Includes not working | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6991@lists.php.net to get a copy of this message | ||
Only a 'file' parameter is required, according to
http://smarty.php.net/manual/en/language.function.include.php
My include (in index.tpl) looks like this: {include file="news.tpl"}
What am I missing?
MO> Your include statement syntax is wrong. Every parameter must have a name
MO> as well as a value.
GH> I have a $news array ( $smary->assign('news', $newsArray) in index.php )
GH> containing 3 [story] objects, each object has properties headline,
byline,
GH> story.
GH>
GH> If I do $smarty->display('news.tpl') on index.php, then news.tpl outputs
3
GH> tables as expected, based on a {foreach} in news.tpl.
GH>
GH> However, when I have $smarty->display('index.tpl') on index.php,
GH> and index.tpl has {include 'news.tpl'}
GH> I'm not getting the same result output to the browser.
GH>
GH> Is there a limitation with nested includes? Or something I'm missing?