You are here: Smarty Help « PHP Programming Language « IT news, forums, messages
Smarty Help

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация