Back

Templates
templateLayout
Template of phpLens in view state The Smarty template file must be placed in the templates subdirectory of the Web page. The following template variables are available: {$COLORNAVBORDER} -- The color of the navigation menu background. {$LAYOUT_ATTR} -- all the layout table attributes, including bgcolor {$TOPCAPTION} {$BOTTOMCAPTION} {$GRIDDATA} -- an array holding an the html for each column {$DETAILDATA} -- the html for the details of a row {$PAGENO} -- the current page number {$NAVMENUS} -- the menus {$ERRORMESSAGES} -- where to display error messages (see also templateShowErrors). A synonym for {$LAYOUT_ATTR} is {$COLORBACKGROUND} for historical reasons. Also since 2.8, if you set $lens->templateLayoutAddFilter then a new variable becomes available, {$FILTERFORM} -- where to place the filter/search form Syntax `$lens->templateLayout = 'layout.tpl'; Contents of sample layout.tpl: <table {$LAYOUT_ATTR} border=0 cellspacing=0 cellpadding=1> <tr><td> <table bgcolor={$COLORNAVBORDER} width=100% cellspacing=0 cellpadding=0 border=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} {if strlen($DETAILDATA)>0} <td valign=top>{$DETAILDATA}</td> {/if} </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> </table>` Basic:No Advanced/Enterprise:Yes DynamicEdit:No [Version 1.0]