Here is an experimental patch which just puts the $content of pages into the 'content' region instead of handling it as a special case. Feedback welcome. This may or may not be a good idea.
If we proceed, we might want to add a 'content lower' region and update the blocks currently in the 'content' region to use that region.
| Comment | File | Size | Author |
|---|---|---|---|
| mw.patch | 12.29 KB | moshe weitzman |
Comments
Comment #1
dvessel commentedI don't think this is a good idea since it adds another layer to fill the content unnecessarily. Or is there another reason for this approach?
Comment #2
catchJust in terms of naming, changing it from $content to a center region in page.tpl.php files makes a lot of sense. If we do that, I agree a center-lower/content-lower region would be a good idea. Currently many people expect blocks in the content region to appear above the content, rather than below it, then eventually find out they need to define a new region (or use a theme that does). Not having the special case would make that a bit clearer from the outset.
Comment #3
dvessel commentedAh, I see. I'm still not sure it's a good idea because I never found that assigning blocks above the content hard to figure out when I started theming. Doing it through .info now makes it even more straight forward.
Are there other benefits to this?
Comment #4
Stefan Nagtegaal commentedI like this patch, though I'm not sure we choose the right region name. (Am I nitpicking here?)
The advantage of having everything in regions - and so including $content - is i.e. that dynamic loading of page content (where our "content" exists from left sidebar content, right sidebar content and center content) is going to be so much easier.
There are plenty of other (mostly javascript) patches in our patch queue that would take advantage of such a patch, because targeting the main area for $content is going to be much easier when we know what parent container they live in.
Some other thing I would like to see (not specifically in this patch though), are:
- splitting out $content into several smaller chunks;
- renaming regions to more content aware names, though I could not come up with good suggestions or ideas.
Comment #5
catch@dvessel: this just got bumped up the queue and is a perfect example http://drupal.org/node/93808
Comment #6
dvessel commentedcatch, I'd consider that minor. Especially now since we do not display weights. There's nothing there to suggest that it would ever go above the content. That's what I think anyway.
What Stefan brings up is really interesting. Especially the splitting out $content into smaller chunks. It would need a redesign of the block region admin page I think so it's easier to work with or an entirely different approach to the UI.
Comment #7
maartenvg commentedPatch no long applies
Comment #8
moshe weitzman commentedI think this patch is a good direction. yet I am now interested in going further and making the content of the page into a standard block. that way it can benefit from the block cache. caching by user, role, global is very useful in blocks and no reason why $content should be a second class citizen.
Comment #9
moshe weitzman commented