[drupal-devel] theme 'page'... ideas
Hi, Currently, theme('page', $output) $output is a string which is built by concatenating other themed elements. Let it be an array, and let the themer decide what to do with it. An associative array maybe would be practical. I'd suggest replacing the argument of form to be also an array, and it would call theme_form. Also, the remaining HTML code shall disappear from the code. I have even found a <br>! I know that code is golden, but first, a bit of talk is necessary, especially for the first proposal... Regards Karoly Negyesi
Can you give an example, such as a node view, the home page, a book page, etc? Associative arrays don't have any concept of order, so I think we will be placing a large burden on themes to place each tiem in order. Negyesi Karoly wrote:
Hi,
Currently, theme('page', $output) $output is a string which is built by concatenating other themed elements.
Let it be an array, and let the themer decide what to do with it. An associative array maybe would be practical.
I'd suggest replacing the argument of form to be also an array, and it would call theme_form.
Also, the remaining HTML code shall disappear from the code. I have even found a <br>!
I know that code is golden, but first, a bit of talk is necessary, especially for the first proposal...
Regards
Karoly Negyesi
On Mar 14, 2005, at 1:02 PM, Moshe Weitzman wrote:
Associative arrays don't have any concept of order, so I think we will be placing a large burden on themes to place each tiem in order.
They do, actually. All arrays in PHP are ordered as well as associative. That said, the proposal does worry me, as themes would have to know about each possible set of things that could go on a page in order to do anything intelligent with them. Doesn't seem too futureproof. -- Jonathan Chaffer Applications Developer, structure:interactive (616) 364-7423 http://www.structureinteractive.com/
That said, the proposal does worry me, as themes would have to know about each possible set of things that could go on a page in order to do anything intelligent with them. Doesn't seem too futureproof.
It can do the same dumb thing it is done now -- an implode('', $output) will suffice. However, if the theme knows about some elements, it can deal with them and just print the remnants. I now wait for Chris Messina :)
Before you start with this, you should talk to Chris Messina. He had some great ideas for regionaing a site, based on a matrix model. Tah would the way to go, with your array ideas. Bèr Op maandag 14 maart 2005 18:56, schreef Negyesi Karoly:
Hi,
Currently, theme('page', $output) $output is a string which is built by concatenating other themed elements.
Let it be an array, and let the themer decide what to do with it. An associative array maybe would be practical.
I'd suggest replacing the argument of form to be also an array, and it would call theme_form.
Also, the remaining HTML code shall disappear from the code. I have even found a <br>!
I know that code is golden, but first, a bit of talk is necessary, especially for the first proposal...
Regards
Karoly Negyesi Regards, Bèr -- [ Bèr Kessels | Drupal services www.webschuur.com ]
participants (4)
-
Bèr Kessels -
Jonathan Chaffer -
Moshe Weitzman -
Negyesi Karoly