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. 

I was going to give an example of patTemplate, but the devshed page
isn't coming up. Basically, like someone else said, you teach your HTML
designers to use custom tags that your template engine will recognize
and place the correct values for.

To make a loop, you'd tell your designers to do something like this

<table>
<pattemplate:loop>
<tr><td><a href='{download_link}'>{filename}</a></td></tr>
</pattemplate:loop>

It's not exactly like that, mind you, but you get the idea. 

You can't ever completely separate you designers and programmers. What
you do is provide an easy to understand way for your designers to
include the programming elements. What's easier, teaching them to put
<?=$_POST['name']?> or {name} in the document???

---John Holmes...


> -----Original Message-----
> From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 25, 2002 3:50 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Seperating presentation from logic
> 
> Thanks for the links. Hard to figure out what those things are just
from
> their web pages. They should work on making it easier to figure what
the
> projects are.
> 
> I'll have a look but ...
> 
> Maybe my message was too vague but what I meant is that my designers
> will come up with the site layout, colours, graphics etc ... I want
them
> to be able to do all their work without thinking about any
programming.
> 
> If they want to make a page that lists in a table all the documents we
> have from 1999-2001, then they can can do this easily without worrying
> about me.
> 
> And just as importantly I can code the scripts that will generate the
> table without worrying that maybe in the future the layout will
change.
> 
> So I how can I do this? i.e. if the designers want to change the
> background colour on one page how can they do this without coming to
seem?
> 
> Jc
> 
> 
> --
> 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