Re: [SMARTY] How to write {/functions} ?

From: Date: Wed, 24 Apr 2002 18:08:43 +0000
Subject: Re: [SMARTY] How to write {/functions} ?
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3874@lists.php.net to get a copy of this message
> How to write a function to handle both {function} and {/function} calls? > A simple example: > > <html> > <body> > {my_form} > <input type="text" name="field_one"><br> > <input type="text" name="field_two"><br> > {/my_form} > </body> > </html> > > I would like to write a function to echo "<form name='my_form' method='post'>" > on {my_form} call and to echo "<input type='submit'></form>" on {/my_form}. > > How to write my_form() function ? I have also encountered this problem, and I came to a solution to use {endform} to end the form. BTW it would be nice to have some support for functions named {/function} Goba

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