Question about php+div frames
| From: | Bruno Gonzalez) | Date: | Mon, 12 Feb 2007 22:19:36 +0000 |
| Subject: | Question about php+div frames | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-13682@lists.php.net to get a copy of this message | ||
Hello, i'm new to Smarty, and i have several questions (of course! :)
I have a website composed of three main "frames" (they are html code in 3 different <div> tags, so that it looks like traditional html frames via css, but they're *not* traditional frames).
-The top frame is (at this moment) fixed and with static contents.
-The left frame (site index) is regenerated on the fly each time (still haven't thought about how to handle caching for this).
-The right frame (site body) can be of several "types", each of them may have different contents each time (like site index).
All the "frames" currently have a template, looks like this: [page.tpl file]
...
<title>My Website - {$pageTitle}</title>
...
<div class="topframe">{include file='logo.tpl'}</div>
<div class="leftframe">{include file='index.tpl'}</div>
<div class="rightframe">{include file=$pageViewFile}</div>
...
Currently, the whole page.tpl is rendered by page.php, which assigns the variables depending on code.
However, i intend to provide each "frame" its own php code: logo.php assigns logo.tpl vars, index.php assigns index.tpl vars, and $pageCodeFile assigns $pageViewFile vars.
How do you recommend i structure the whole thing?
I was thinking on doing 3 (or more) separate "->display()" calls (one for each frame, + start and finish of the page html code), preceeded by a call to the respective .php file (which would assign the vars needed by the displayed() templates); but i'm not sure about this.
Also, i may want to cache the contents of index.tpl each 10 minutes, or each 10 reloads. Maybe some of the $pageViewFile pages too. But i'm not sure how to do this either...
First priority is getting the thing working without cache, then i'll think about cacheing.
Sorry for the mess of ideas; if necessary i'll try to explain again.
Thanks in advance for any help!
--
Saludos,
STenyaK
_______________________________________________
Site: http://1ksurvivor.homeip.net <1kSurvivor>
http://motorsport-sim.org <Motorsport>
http://kwh.iespana.es
<KuantikalWareHouse>
http://emuletutorial.info <EmuleTutorial>
ICQ: 153709484
Mail: stenyak AT gmail DOT net