Coding style??

From: Date: Fri, 10 Oct 2003 14:46:33 +0000
Subject: Coding style??
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10327@lists.php.net to get a copy of this message
Hi all of you, I hope you can read this, my english is kind of poor... But I need advise about coding style and use of SMARTY. Here I have posted a sample of code where I use lots of templates that in the end all is put together i a main.tpl that display the page. Is this yau of using SMARY bad? I mean, insted I could use lesser tempaltes to display my page. And for example insted use include. In this example there are lots of fetching from the db, that migth bee bad for speed. Please sort it out for me, I need som clue on a good coding style for SMARTY!! thank you and have a good weekend. / JohannesF --------------------------------- require_once 'setup.php'; $smarty->assign("head", $smarty->fetch('db:head.tpl')); $smarty->assign("foot", $smarty->fetch('db:foot.tpl')); $smarty->assign("nav", $smarty->fetch('db:nav.tpl')); $smarty->assign("campain", $smarty->fetch('db:campain.tpl')); $smarty->assign("sponsor", $smarty->fetch('db:sponsor.tpl')); require_once 'nav_page_load.php'; $smarty->assign("nav_page", $smarty->fetch('db:nav_page.tpl')); $smarty->assign("page", $smarty->fetch('db:textpage.tpl')); $smarty->display("db:main.tpl"); ----------------------------- Johannes Fosseus http://www.poeter.se - Skön kultur på Internet http://www.mindagbok.se - Dagbok på Internet

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