Re: [PHP Template] Re: [PHP3] template engine example document
[email protected] (Ron Chmara) Mon, 27 Mar 2000 11:39:53 -0700
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
Andrei Zmievski wrote: > On Sun, 26 Mar 2000, Ron Chmara wrote: > > Then the designer gets two variables, that they can use, or not use. > > $tblcolor1 = "" > > $tblcolor2 = "" > > If they want two colors, they assign two. If they want one color, > > they get assign one. They don't _do_ any logic that way. The logic > > looks for two vriables, if there are two, it alternates. > What do you mean by "they assign two"? I thought designers only used > include's and echo's in your examples? They do when logic is not controlled by appearance. :-) The point of dynamic web languages (well, one of them) is that you can have extremely simple pages, where logic and content don't affect eachother, but as soon as the visual design affects the logic, designers start having to pass variables to the logic. > > They can pass HTML tags in variables. That's nothing new, either.. > > if you want them to always be based on a ruleset, you can implement it, > > but a designer shouldn't _be_ specifying what those rulesets are, > > arbitrarily. Their land is arbitrarily controlling appearance, no? > > So give them control of their variables. > Well, what if the variable comes from the database? If it's empty, you > want to not display <br> after it? See, the designer can't control this > now. Yes and no. If it's part of the logic, they don't have to. This, again, requires fairly complex logic for knowing _when_ to insert a tag, and when not to. Hopefully, you'd program that in PHP into a code block, say, an HTML handler of some sort.... which is, I guess, where you wound up, only instead of calling that handler for individual cases, you built a "template" to manage it. :-) -Bop -- Brought to you from boop!, the dual boot Linux/Win95 Compaq Presario 1625 laptop, currently running RedHat 6.1. Your bopping may vary.