|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Enquest Smarty Regular
Joined: 14 May 2003 Posts: 79
|
Posted: Fri May 23, 2003 7:22 am Post subject: Using tables and boxes. Combining $smarty |
|
|
Hi,
My index looks like this
Code: |
header.tpl...
<table width="100%" border="0">
<tr>
<td valign="top" width="10%">
{include file="leftbar.tpl"}
</td>
<td valign="top" width="80%">
{include file="$tbody"}
</td>
</tr>
</table>
footer....
|
As you can see I have a leftbar and the main field $tbody keeps all content.
However I want to make my leftbar -- $leftbar so the content of leftbar wil be dynamic.
The question: How do make this work.
Code: |
$smarty->assign('tbody', 'home.tpl');
$smarty->display('index.tpl');
$smarty->assign('leftbar", home.tpl");
$marty->display("leftbar.tpl")
|
This code cannot be on the same page. So I'm poundering how would be the correct way. So that the content of the leftbar is linked to the content of the right bar.
To make mathers more complex, maybe als the top bar and footer change...
Thanxs for any help. _________________ -----------------------
Learning my self by trying to help others |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Fri May 23, 2003 9:57 am Post subject: |
|
|
Code: |
$smarty->assign('tbody', 'home.tpl');
$smarty->assign('leftbar", left.tpl");
$smarty->assign('topbar", top.tpl");
...
$smarty->display('index.tpl');
|
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|