[Phpmyadmin-devel] Re: Templates

Hi Moving discussion to -devel list. On Tue, 30 May 2006 16:08:28 +0200 Sebastian Mendel <lists@sebastianmendel.de> wrote:
just introducing a template engine is not very difficult - just make real usage of it everywhere will take a 'little' time
at first step we could just catch the output into a variable and put it into the 'main'-template (just an empty template with only html-headers and body on it, just the things that are common on every page)
i moved an entire live system into templates with this practice.
than you can easily step-by-step move more code into templates
with this practice it is possible to check-in in smaller steps, making it easy to let more people check-in template code without interfere
Sounds interesting.
2 votes for Smarty - ;-)
I can't vote as I don't know neither Smarty nor any other php template engine. -- Michal Čihař | http://cihar.com | http://blog.cihar.com

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi!
at first step we could just catch the output into a variable and put it into the 'main'-template (just an empty template with only html-headers and body on it, just the things that are common on every page)
i moved an entire live system into templates with this practice.
This would be the easiest solution, and will carry through code. However it might create trouble to have many conditional issues and variables in the template compared to when redone from scratch with a clear concept. I am especially speaking of all the conditional JavaScript/HTML/PHP redirects and output messages which will be harder to implement. Stuff like templating the "Create Table" or "Browse" dialog would actually be the easiest part of it. I could offer to volunteer porting the "Browse" section to Smarty once the framework is there. Best regards, Garvin - -- ++ Garvin Hicking | Web-Entwickler [PHP] | www.garv.in | ICQ 21392242 ++ Developer of | www.phpMyAdmin.net | www.s9y.org ++ Make me happy | http://wishes.garv.in -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFEfFdfUZolOPYrUhYRAgMIAJ45oziUUGT3dnABTxe2b6gdx3peVQCfaBq9 zM72eQapKkm7sCAh7tnxkrk= =AAvZ -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Garvin Hicking schrieb:
Hi!
at first step we could just catch the output into a variable and put it into the 'main'-template (just an empty template with only html-headers and body on it, just the things that are common on every page)
i moved an entire live system into templates with this practice.
This would be the easiest solution, and will carry through code. However it might create trouble to have many conditional issues and variables in the template compared to when redone from scratch with a clear concept. I am especially speaking of all the conditional JavaScript/HTML/PHP redirects and output messages which will be harder to implement.
much of this redirects are not required with templates anymore, as you can decide at the end what template will be displayed without redirects! btw. with a template enigne you have the freedom to make many choices not at the start - f.e. you don't need to know the 'resulting' table at the start of the script (for navigation links), the resulting table can assigned at the very last just before the template is processed - -- Sebastian Mendel www.sebastianmendel.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (MingW32) iD8DBQFEfFvjX/0lClpZDr4RAu+5AKCRccHjotyw+kfSYwTdV6BMHhyU6wCfc/nP 7HlQVgeob2y06D6R3rmdJhA= =jCW0 -----END PGP SIGNATURE-----
participants (3)
-
Garvin Hicking
-
Michal Čihař
-
Sebastian Mendel