Back
templateLayoutAddFilter
Templates
templateLayoutAddFilter
Adds new variable to layout template that holds filter/search form
Default:
The new variable added is called {$FILTERFORM}.

For example, if you want to show the filter form in both at the top and bottom of the phpLens grid, you can define the following layout template in your templates/layout.shtml file:

{$FILTERFORM}
{if strlen($ERRORMESSAGES)>0}
{$ERRORMESSAGES}
{/if}
<table {$LAYOUT_ATTR} border=0 cellspacing=0 cellpadding=1>
<tr><td>
<table bgcolor={$COLORNAVBORDER} width=100% border=0 cellspacing=0 cellpadding=0>
<tr><td>   {$TOPCAPTION}</td><td align=right>{$NAVMENUS}</td></tr>
</table>
</td></tr>
<tr><td>
<table border=0 width=100% cellspacing=0 cellpadding=0>
<tr> {section name=cols loop=$GRIDDATA}
<td valign=top> {$GRIDDATA[cols]} </td>
{/section}
<td valign=top>
{if strlen($FILTERFORM)>0}
{$FILTERFORM}
{/if}
{if strlen($DETAILDATA)>0}
{$DETAILDATA}
{/if}
</td>
</tr>
</table>
</td></tr>
<tr><td>
<table bgcolor={$COLORNAVBORDER} width=100% border=0 cellspacing=0 cellpadding=0>
<tr><td>   {$BOTTOMCAPTION}</td><td align=right>{$NAVMENUS}</td></tr>
</table>
</td></tr>
{$FILTERFORM}

Syntax
$lens->layoutTemplate = 'layout.shtml';
$lens->templateLayoutAddFilter = true;

 Basic:Yes  Advanced/Enterprise:Yes  DynamicEdit:Yes   [Version 2.8]