Re: [PHP Template] Re: [PHP3] template engine example document
[email protected] (Ron Chmara) Mon, 27 Mar 2000 17:28:41 -0700
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
Monte Ohrt wrote: > This solution would technically work, although it's going to make it > hell for a designer to work with templates. It really depends on the workflow. It's an ill suited workflow for sites which only have a few master documents, with very few changes. For a site that constantly revises portions of their pages, it makes it much easier than revising 20-50 template documents. > In the currently proposed > template engine, the templates relatively resemble the final output. > With the solution given here, you have just fragmented a single page > into lots of ".inc" files, which will make a designer cringe. Well, the goal was to do it in PHP. If the goal was maximum designer happiness, then the designer would generate an HTML mockup, without any form of dynamic content, and then move on to the next design, no? :-) I chose the format that I did to point out how granular the separation of design logic from function logic could be, most of the page can be wrapped into one or two function includes. > I speak > from experience on this one, we ran into this same situation with > FastTemplates. We had complex html pages strung out over many files and > this was unworkable for the designer. Yeah, _unless_ the chief of design is involved in how granular the breakout is, there are bound to be issues of the site being "too modular" or "not modular enough". Hence the debate/issues over having to make so many templates for a 200 page site, vs having to work with many modules for a 200 page site. > I know there are some exceptions like breaking headers and footers into > include files. Designers don't seem to mind this one. It's a clear metaphor _now_. Cascading Style sheet headers are something new for many designers.... it takes a while to train to a modular workflow if one is used to flat assembly. > Generally, each > page uses the same header & footer, so they don't need to visually see > this on each template. But breaking out every little piece of logic > that needs a special html tag, looping, etc... that quickly turns into > an unmanageable mess of files. Directory structure for one site (with the most components): /headers /footers /tables /variable_blocks /widgets /db_blocks As long as they can handle file management, it's not that hard. A bit like managing hundred of functions, or hundreds of HTML tags. ;-) -Boppers -- Brought to you from boop!, the dual boot Linux/Win95 Compaq Presario 1625 laptop, currently running RedHat 6.1. Your bopping may vary.