473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Smarty Help

pek
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..

Jan 24 '06 #1
0 1025

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Daan | last post by:
Hello all, I'm having a little problem with Smarty. Getting it to work in a simple case went fine, but now I have the following situation: / /smarty /templates template.tpl /templates_c
1
by: Richard | last post by:
I need help. I have a smarty based program that I am modifying. I have a smarty template file that consists of smarty and HTML. I need to integrate some PHP database calls into it. My problem...
2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
2
by: M | last post by:
Hi Folks, I am trying to install Smarty using PHP 5 on a Windows XP PC using IIS v6 The following PHP File: <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head>
0
by: Matt | last post by:
geez, i've done this a million times, you'd think i could get it right. uploading to production server for a new site, and part of the head.inc that starts everything up looks like this: echo...
2
by: Freebird | last post by:
Hello you all, =] I've a smarty var, like this: {$var} that is equal to: ttttttttttttt|zzzzzzzzzzzz It can be any size, the important is that they are separated by the '|' How do I...
7
by: diane100 | last post by:
Hi I am new to PHP and Smarty (I know only very basic things) and I need help with a warning message I get when I call a page in a browser. I purchased some software from a company who are no...
1
by: sksksk | last post by:
I want to achieve the following process in the smarty for $item one i should be able to get the value using loop.index, but without any luck. any help is appreciated. <?php for ($i = 1; $i...
6
by: K. | last post by:
Hello! I have a problem with using php on smarty web page I would like to use a php code from this web page: http://www.money.pl/webmaster/# i.e.. <?php readfile...
1
by: ajaymohank | last post by:
hello friends.......... i am new to smarty. can anyone please tell me how to get the value from a dynamically generated checkbox using smarty. this is the code i used... here i am generating 10...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.