Re: [SMARTY] start end tags patch
| From: | Pupeno | Date: | Tue, 02 Jul 2002 06:51:33 +0000 |
| Subject: | Re: [SMARTY] start end tags patch | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5159@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 02 July 2002 01:11, Monte Ohrt wrote:
> Exactly what is this for?
I posted some time ago the way I used to work and this make it posible.
The idea is to work with subtemplates, I have an index.html for all the pages
so all the pages contain the same headers and layout, for example, that page
includes the cascade style sheet, some javascript, everything for all the
page, create som divs to show the menu, etc, etc... but the menu is not in
that page because the menu is language dependant, so, the menu is in
en/menu.html for example, so that page includes en/menu.html (in fact
$lang/menu.html and $lang contains the language to be used).
The start and end tags helps to edit that menu.html because headers are really
important, Dreamweaber for example knows if it's HTML, or XHTML acording to
the header, the encoding... and supouse that the menu is going to have a
black background so, the font in the menu.html is white, if you don't have
some enclosing formating that makes the background black, it will be
imposible to work, but you can't just write put that code in the menu.html
because the real formating is in the index.html, so you just put something
that helps you coding outside the start and end tags and smarty won't process
it, it will be ignored.
I have, for example, developed a very advanced wizard engine in PHP that let's
me make a wizard very fast, it uses this start and end tag because there's a
wizard.html that makes the form, including the buttons at the bottom of the
form, frames and that kind of things, and the diferent contents of the
diferent steps are read from other files, but that other files contain forms,
Dreamweaber or any good WYSIWYG editor won't allow you to insert forms object
if you're not inside a form, so start and end tags solve this:
<form>
{start}
<input type="text" />
{end}
</form>
you see ?
I know, nobody except me depends on this feature but I think some other people
may find it usefull in the future and in the worst case, it won't harm
anyone, AFAIK.
Thank you.
- --
Pupeno: pupeno@pupeno.com
http://www.pupeno.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9IU13Lr8z5XzmSDQRAie3AJ4s1aej43+sW8E1U8No9KIsQvAeEQCcCpi/
7BOfgYLk35LDS3nMVckGKJ8=
=a6zt
-----END PGP SIGNATURE-----