I can only talk about smarty but the designers can use as little or as much
of the features in the template.  For example:

Typing {$app_version} in an ordinary html file could display "Greatest
Application version 3.3".  If your programmer changes the value to "Greatest
Application version 4.0", the designer doesn't have to do anything. It would
show up automatically

This is a simple idea but what if you want to support multiple languages.
You tell your designer, use this tag for the welcome message {$welcome_user}
and if the user chooses english the message will come up like this "Welcome
Mark" and if the user chooses french then it will come up like this "Bonjour
Mark".

Smarty also has a bunch of tags like {html_select_date start_year=1998
end_year=2010} which would spit out a pulldown menu of all the months, a
pulldown menu of all the days, and a pulldown menu of all the years from
1998 to 2010.

You could create your own tags too like {display_all_users_online} and it
would spit out all the users online.  Or you could create a tag like
{diplay_calender bg=blue text=black} and it would spit out a calender table
with a blue background and black text.

I'm sure those tags I showed you aren't hard to grasp, you can make it
harder with smarty cuz it has if/else and loop tags too but that's for more
advanced designers.



-----Original Message-----
From: Jesper Brunholm [mailto:[EMAIL PROTECTED]]
Sent: June 27, 2002 7:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Seperating presentation from logic


John Holmes wrote:
> You really want a template system. Check out Smarty or patTemplate.
> Devshed.com has a nice two part tutorial on patTemplate and I like how
> it looks a little better than Smarty right now. Might want to evaluate
> both and see which is faster or easier.

Great idea - except that... when you've taught your designer to use the
template system you've ofte used about the amount of time it would take
to give him enough knowledge about php to go directly into the code the
way that Freeman suggested...

Regards

Jesper Brunholm

--
Phønix - Danish folk music from young musicians - http://www.phonixfolk.dk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to