how to hide a template only if a variable is set to a value ?

A general technical discussion area for patTemplate.
Locked
wene
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 203
Joined: Sat Aug 20, 2005 1:40 am
Location: south of France

how to hide a template only if a variable is set to a value ?

Post by wene » Thu Dec 29, 2005 3:29 am

hello
i would like to show a template only if a var is defined like

$tmpl->addVar ('mytmpl','myvar',1);


   

   
          test1
   

   
          test2
   

   
   


i do like this, but i don't think that its fine.
i dont want to use visibility attribute because the value is inside an array that is given with addRows.
(i used  addVar for the exemple because its simplier).
(i have made a toolbar, and i want the text to be displayed all the time , but only sometimes, i want to hide it)
Last edited by wene on Sun Jan 01, 2006 4:13 am, edited 1 time in total.

Locked

Return to “patTemplate”