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.

CommentFileSizeAuthor
mw.patch12.29 KBmoshe weitzman

Comments

dvessel’s picture

I 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?

catch’s picture

Just 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.

dvessel’s picture

Ah, 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?

Stefan Nagtegaal’s picture

I 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.

catch’s picture

@dvessel: this just got bumped up the queue and is a perfect example http://drupal.org/node/93808

dvessel’s picture

catch, 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.

maartenvg’s picture

Status: Needs review » Needs work

Patch no long applies

patching file index.php
Hunk #1 succeeded at 32 (offset -1 lines).
patching file install.php
Hunk #1 succeeded at 127 (offset 18 lines).
Hunk #2 succeeded at 202 with fuzz 2 (offset 3 lines).
Hunk #3 succeeded at 431 (offset -12 lines).
Hunk #4 succeeded at 527 with fuzz 2 (offset 7 lines).
Hunk #5 succeeded at 558 (offset 7 lines).
Hunk #6 FAILED at 597.
Hunk #7 succeeded at 611 (offset 7 lines).
Hunk #8 succeeded at 837 (offset 23 lines).
1 out of 8 hunks FAILED -- saving rejects to file install.php.rej
patching file update.php
Hunk #1 succeeded at 688 (offset 27 lines).
patching file includes/batch.inc
Hunk #1 FAILED at 133.
1 out of 1 hunk FAILED -- saving rejects to file includes/batch.inc.rej
patching file includes/common.inc
Hunk #1 FAILED at 331.
Hunk #2 succeeded at 2896 (offset 74 lines).
1 out of 2 hunks FAILED -- saving rejects to file includes/common.inc.rej
patching file includes/theme.maintenance.inc
patching file themes/chameleon/chameleon.info
patching file themes/chameleon/chameleon.theme
patching file themes/chameleon/marvin/marvin.info
moshe weitzman’s picture

I 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.

moshe weitzman’s picture

Status: Needs work » Closed (duplicate)