add button control |
11/11/2008 6:34:48 AM |
PHPRunner General questions | |
G
garethp authorDevClub member
Hi if ($_SESSION["bom_masterkey1"]<>"") { $smarty->assign("addnew",1); } else { $smarty->assign("addnew",0);
<SPAN class=buttonborder>{if $addnew}<INPUT class=button onclick="window.location.href='bom_add.php'" type=button value="Add new" disptype="control1">{/if}</SPAN>
<SPAN class=buttonborder><INPUT class=button type=button value="Add new" {$addlink_attrs}></SPAN>
|
|
![]() |
Sergey Kornilov admin 11/11/2008 |
Excerpt from http://www.xlinesoft.com/phprunner/docs/smarty_templates.htm view.htm {BEGIN Model_fieldblock} <tr><td class=shade width=150>Model</td><td width=250> {$Model_value} </td></tr> {END Model_fieldblock} In view.php file use the following: $xt->assign("Model_fieldblock",true);- code snippet between {BEGIN ...} and {END ...} appears in the output. $xt->assign("Model_fieldblock",false); - code snippet goes away. |
G
|
garethp authorDevClub member 11/11/2008 |
Great - getting a bit better with the new language. |
A
|
amuro 11/12/2008 |
vesion5.0 (build 587), try this |
G
|
garethp authorDevClub member 11/13/2008 |
Thanks Amura |