Re: [SMARTY] start end tags patch
| From: | Pupeno | Date: | Tue, 02 Jul 2002 17:58:27 +0000 |
| Subject: | Re: [SMARTY] start end tags patch | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5164@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 02 July 2002 09:19, Monte Ohrt wrote:
> Why not comment out the parts you want ignored?
>
> {* <form> *}
>
> <input type="text" \>
>
> {* </form> *}
Because the first line in a well formed XHTML has to be something like
<?xml version="1.0" encoding="UTF-8"?> followed by the doctype, if not,
some
WYSIWYG editors will complain and may ending scrwing up the template.
> Also, you can pass parameters to your menu.html file to control the
> colors dynamically:
>
> {include file="menu.html" bgcolor="#000000" fontcolor="#ffffff"}
That's not enough if you take a look of what I did in my wizard engine.
Arround the step files there's a form.
> I don't want to add any new syntax to Smarty unless it is absolutely
> warranted. If I did this, then we consume the function namespace for
> {start} and {end}, not to mention that it doesn't follow the tag pair
> conventions of Smarty. Tag pairs should be the same name, such as
> {block}{/block}
Ok, I can change to a pair like that. It's not procesed like other pairs, it
just cleans everything else before start procesiong, you don't have to put
start end in your templates, if there's no start end, it is processes as it
used to do. How would you like them to be call ? {proc}{/proc} ?
{template}{/template} ?
I didn't add that feature just because I'm rebel, I've been working with
templates for years, I developed my own template library but smarty is far
much better for all the things it can do, but for the way I work, I really
need something like this, I tryed all the things I've found and I posted and
discussed diferents approachs here.
- --
Pupeno: pupeno@pupeno.com
http://www.pupeno.com
PS: something I've found usefull and you may also find (because I use Smarty
tags a lot in Javascript and I didn't want to mess with lot' s of stricts
tags) is changing the left and right delimeter to {{ }} just one more
character and save you a lot of troubles.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9IenGLr8z5XzmSDQRAhqfAKDA6EeT2clim8gw6MVEEYDAYANpbACfRakR
8voSAhH6bbjLIuZnXo1/7rQ=
=cKts
-----END PGP SIGNATURE-----