Re: template engine...why???

From: Date: Wed, 30 Apr 2003 20:50:38 +0000
Subject: Re: template engine...why???
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-145858@lists.php.net to get a copy of this message
At 4/30/2003 11:24 PM, Salah Faya wrote:
"I want the title to be limited to 80 chars in this position while keeping it as it is in that position" that means I should either create two functions or make my function customizable eg: articleTitle(80) or articleTitle().. ok solved, after few days he may come to me and say I want it to be ucwords'ed.. I will tell him ok just use ucwords(articleTitle()).. and another time he found that he wants articleContents to be wordwrap'ed in some page and htmlstrip'ed in another.. (I will simply tell him go learn PHP!)
I can see that. But in a case like that, you need to have the designer decide what will be the standard. There has to be some kind of line drawn between styling and data retrieval.
Another thing, the loops and repeated blocks grant designers a lot of headache moreover when they see non-understandable php codes split their design, Yet dreamweaverMX have solved that a bit.. but a lot of designer still don't prefer to have complicated php codes in their html while they design.
Sorry. I'm totally not understanding what you just said in that paragraph. What loops? What repeated blocks?
There must be a way of making this easier for designers.. and this could be a template system which uses php logic itself while keeping Designers away of complicated ones, oh yes and <? myFunction() ?> is also similar to {myFunction}
Which is exactly my point. What's the difference between making a designer learn a new templating language and learning a few PHP function names?
I'm not against using php itself for making templates, if it was me who designs I would love to use php and php only combined with html, but when it comes to designers who usually don't know PHP, I can't trust leaving them with php-codes in one room.
I understand that, and I can see the value in not wanting non-coders to get into the functions themselves. I'm guessing that my issue lies in the fact that I see functions for retrieving data as simplistic, that data should be returned in the most basic forms possible with as little markup as you can get away with. Styling, layout, and that kind of thing should be done in the actual pages, not in the data functions. But that's just me, and apparently a lot of people here don't subscribe to that view point. And I can definitely see your point on the truncated data return, but I'm still not seeing how a templating language would make that easier. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: skeller@healthtvchannel.org Web: www.healthtvchannel.org

« previous php.general (#145858) next »