From: Greg M. <me...@ms...> - 2004-06-29 19:13:32
|
Hello all. I have a quick question about templating. I have a item class with a few vars that are not required. In that item class, I have a view function.=20 That view function sets up the tags then calls the process template function. Right now with those optional vars is that the label is showing but then there is no data to show with it. I set up my view.tpl to be like this: <!-- BEGIN DATUM2 --> {DATUM2_LABEL}:<br /> {DATUM2}<br /><br /> <!-- END DATUM2 --> with Datum2 being an optional field. Even set up like that, the label still shows. I was hoping that with it set up like that, the code chunk wouldn't show even though the DATUM2_LABEL is present. Am I going to hav= e to check every label before adding it to the tags? [i.e. if(isset(datum2))....] I'm hoping there is a more "graceful" way that having an if statement for all the variables (there is a lot of them). I hope all that made sense. Any thoughts anyone? Thanks in advance. Greg |