Forum Moderators: coopster
I'm currently doing this in Perl and using Template Toolkit, but for many reasons would like to rewrite it in PHP.
URLs would be of the form
[example.com...]
I would likely use mod_rewrite to change that to
/mypage.php?product=productname&catlist=cat1/.../catN
However, I'm unsure about the best way to approach the whole application, since it's been a while since I've done anything large in PHP. Should I use a template class? If so, which ones to look at or avoid?
Thanks,
Sean
in your case mypage.php would be querieyng the data based on category and product and then create the html structure of your page and inserting textual data from your database. that's really simple and with shorttags you can integrate your variables simply in your output:
...html...<?=$variable?>....html....
i think more simple can no template be.
That said, I've looked at some template engines in PHP and they don't seem to do it as neatly as TT2 :(
Sean
It also does caching of both compiled templates and the output, which is something I had to handle myself in the perl engine. Using PHP also lets me do some things like redirects much more cleanly than I was doing before.
Sean