Re: [SMARTY] ErrorBlocks?

From: Date: Wed, 17 Apr 2002 18:58:36 +0000
Subject: Re: [SMARTY] ErrorBlocks?
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3797@lists.php.net to get a copy of this message
Well I notice a problem here.. Im using adodb which shouldnt matter but if i run $FNrequired=$row->fields[FNrequired]; Then say echo $FNrequired in a straight php page I get 1 which is correct BUT If i try {$FNrequired} In the template, it doesnt show anything... Any reason? Thanks ----- Original Message ----- From: "Monte Ohrt" <monte@ispi.net> To: "Ray" <rayge99@hotmail.com> Sent: Wednesday, April 17, 2002 1:27 PM Subject: Re: [SMARTY] ErrorBlocks? > You could assign a simple boolean variable to the template, then use > that as a conditional: > > {if $show_block} > > {/if} > > where $show_block would be true or false. Of course use something > besides show_block, something descriptive of its purpose like > "in_wizard" or "is_errors" > > Ray wrote: > > YEs but that COde would have to be in the Template.. I dont want to confuse > > the designers.. I wanna make it so a monkey can do it... Hehe > > > > Like In my step2.php file that parses the template > > I wanna do the if thens and give the designer just a simple tag to either > > show or hide the block based on the code in step2.php > > Does that make sense? Or is there an easier way? > > > > Thanks > > ----- Original Message ----- > > From: "Monte Ohrt" <monte@ispi.net> > > To: "Ray" <rayge99@hotmail.com> > > Cc: <smarty-general@lists.php.net> > > Sent: Wednesday, April 17, 2002 12:02 PM > > Subject: Re: [SMARTY] ErrorBlocks? > > > > > > > >>{if $FNrequired eq 1 or $FNrequired eq 2 and $switch eq 1} > >>Show this block > >>{/if} > >> > >>Ray wrote: > >> > >>>Im working on a self submiting Form page > >>>I just need to know how to show the error blocks if somthing is true > >> > > Example. > > > >>>if($FNrequired == 1 || $FNrequired == 2 && $switch == 1) { > >>>SHow this block } > >>> > >>> > >> > >> > >> > >>-- > >>Monte Ohrt <monte@ispi.net> > >>Director of Technology, ispi Inc. > >> > >> > > > > > > > > -- > Monte Ohrt <monte@ispi.net> > Director of Technology, ispi Inc. > >

« previous php.smarty.general (#3797) next »