Re: [PHP Template] Re: [PHP3] PHP Template Engine spec revision 0.52

[email protected] (Jacob Stetser) Wed, 22 Mar 2000 07:08:17 -0500
Newsgroups php.template
Message-ID <a04310100b4fe668fa7f2@[192.168.0.5]>
>
>Here is an example for this template engine:
>
>template
>--------
>	<HTML>
>	<HEAD>
>	<TITLE>{$title}</TITLE>
>	</HEAD>
>
>	<BODY bgcolor="{$bgcolor}">
>		...
>	</BODY>
>	</HTML>
>
>PHP script
>----------
>$id = tmpl_load("template.tpl");
>tmpl_assign($id, array("title" => "My Page", "bgcolor" => "#458830"));
>print tmpl_fetch($id);
>

I think that a more complex template language is great for those 
people who are both designers and programmers, but I have some 
designers I KNOW I don't want touching application logic. I simply 
want them to say to me.. Can we do this, and this is the way I want 
things to look. My HTML people implement that in HTML, add in the 
{template} areas, and I or another developer implements the 
application logic that makes that all work.

Most designers shouldn't be getting any deeper in the what happens 
if... than the conceptual level, and adding in the variable areas as 
the {fdsfsdf} parts in HTML. It's up to the application developer, 
not the designer, to make it all work.

I use FT a lot and I've _never_ embedded PHP into a template file. 
You can't do it, for one. I don't see how your designers got upset 
about that, since you can't do it. If you were doing embedded PHP 
directly in HTML, then I understand wanting to go to a template 
system. But why have the designers do the job for you, when they 
could be better doing what they do best?

If they're developers too, then let them learn PHP. It's not that 
hard :) (trust me, I learned it, and i'm not really that into the 
programming mindset)

That said, I haven't decided how I stand on a template language. 
However, one this complex should not be included with PHP by default.