looped includes in section

From: Date: Mon, 26 Mar 2001 16:38:59 +0000
Subject: looped includes in section
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-439@lists.php.net to get a copy of this message
Hi, why i can display multiple values through section-loop but am not able to include multiple files within that section !? ------------------------------------------------------------------------ This works: ------------------------------------------------------------------------ <php> require_once("smarty/Smarty.class.php"); $smarty = new Smarty; $smarty->compile_check = true; $smarty->assign("main","main/001.tpl"); $smarty->assign("subs", array("side/s002.tpl", "side/s001.tpl"")); $smarty->display('page_frame.tpl'); </php> <template> {section name=side loop=$subs} {$side/subs} {/section} </template> Output: "/side/s002.tpl /side/s001.tpl" ------------------------------------------------------------------------ And this won´t (but i need something like it): ------------------------------------------------------------------------ <php> // ... same as above </php> <template> {section name=side loop=$subs} {include file = "$side/subs"} {/section} </template> Output: "Warning: Failed opening './templates_c//subs.php' for inclusion" ------------------------------------------------------------------------ ------------------------------------------------------------------------ Best regards, Holger

« previous php.smarty.general (#439) next »