{if $ENV.prefs.show_search}
// some code
{/if}
This example was taken from the Dataface_Main_Template.html file. The $ENV.pref.show_search line basically checks the conf.ini file to see if the preference show_search has been set to 0. If it hasn't, then it will show search.
Another example is in the Dataface_List_View_summary.html file (which is an alternative template to list view of a table) there is a line of code:
{if !$ENV.prefs.SummaryList_hideSort}
Notice however, that there is a ! symbol. So in order to actually turn it off, the preference must be SummarList_hideSort = 1.
This idea can be extended across all templates.
No comments:
Post a Comment