|
Posted by pek on 01/24/06 16:46
OK, I'm really new in this Template Engine..
I can't figure out how to structure my templates..
Here is what I'm trying to figure out..
Let's say I am building a portal..
So I create a structure.tpl that has a table with 3 rows and 3
columns..
The top and bottom columns are merged to one for header and footer..
Now, the middle td is where the body will be and I use {$body}
I also create a box template box_model.tpl that has a simple table with
3 rows and 1 colum.
{$title}
{$body}
{$date}
Now, if I where to call from index.php the portal structure and display
"Middle TD" I would use
$smarty->define('body','Middle TD');
$smarty->display('structure.tpl');
What if I wanted to add a box model in the body..?
I can't define seperatly $body for box_model and structure..
So, what do I do..?
Do I have to use different variables for each template or is there
another way..?
Thanks in advance..
Navigation:
[Reply to this message]
|