[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-general
Subject:    [SMARTY] Coding style??
From:       "JohannesF - Poeter.se" <johannes () poeter ! se>
Date:       2003-10-10 14:46:33
[Download RAW message or body]

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

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic