[SMARTY] Question about php+div frames
"STenyaK (Bruno Gonzalez)" <[email protected]> Mon, 12 Feb 2007 23:19:36 +0100
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Message-ID | <op.tnnpmyava64tfs@localhost> |
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=3D"topframe">{include file=3D'logo.tpl'}</div>
<div class=3D"leftframe">{include file=3D'index.tpl'}</div>
<div class=3D"rightframe">{include file=3D$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 $pageCodeFi=
le =
assigns $pageViewFile vars.
How do you recommend i structure the whole thing?
I was thinking on doing 3 (or more) separate "->display()" calls (one fo=
r =
each frame, + start and finish of the page html code), preceeded by a ca=
ll =
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 thi=
nk =
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
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php