Blocks added to 'content' will always go below the actual content even if negatively weighted. Need to clear this up for D5.

And for D6 (maybe for D5, let me know) we should add 'above content' (like in the Zen theme) and include corresponding code in the core themes? Could that go in D5?

Related to http://drupal.org/node/105963.

Comments

dman’s picture

Fair call, although it's a theme thing, and easily fixed by developing custom theme regions.

I've had to develop 'above content' for a banner image that sat between title and content, 'below content' for certain related-link/read-more blocks, and also 'inline with content' (as described in the custom region tute) to get a floating pullquote-type behaviour with text wrap.

Pretty simple once you've done it once, but I agree the ability to define the meaning of 'content' region better would be a good thing.

.dan.

webchick’s picture

Or, should the behaviour be changed so that blocks in the 'content' region are indeed 'above content' rather than below?

This is not the first time a user has posted a support request about this.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

i think the proposed patch is the best change considering where we are in the release cycle. note that only a label has changed, so no DB update required.

d6 should do this better. IMO, the content might actually *be* a block and get placed into a real region.

dries’s picture

This is confusing me. How is below content different from footer?

webchick’s picture

It's still in the content block, just placed below the content and above the footer. So for example, if you had secondary nav running along the bottom, it would be posted above that, while the footer would be below.

But see? Non-intuitive. ;) But Moshe might be right, it might be too late in the release cycle to reverse where this shows up.

drumm’s picture

I'm okay with this.

dries’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

I think it is pretty obvious that the blocks can't go on top of other content.

Plus, we visually show on the block administration page where the blocks are going to show up.

It's all pretty self-explanatory and easy to discover, I'd say.

RobRoy’s picture

Status: Closed (won't fix) » Reviewed & tested by the community

Marking back to old status for another shot.

Dries, I have to disagree. We also "show" where the left sidebar blocks will go, but it is not completely accurate since if you lower the weight enough, your block will go on top of any existing, heavier blocks except for content. The current setup implies IMHO that the content is weighted zero and any blocks heavier/lighter will go after/before the content. I can even remember when I first started using Drupal, I set a block to content with weight -10 expecting it to go on top of the content...but alas, it didn't. It is non-intuitive and it seems like others agree, no?

adrian’s picture

I agree that this is non intuitive.

Perhaps the correct answer is to make the content an actual block.

drumm’s picture

Version: 5.x-dev » 6.x-dev
Status: Reviewed & tested by the community » Needs review

I'm still okay with this, but it will need to go in Drupal 6 first. The patch still applies.

And I don't think anything implies that the main content area is a weight of zero; nothing in the UI directly indicates that. However, I don't mind simply adding 'below' because it goes below the content.

webchick’s picture

I like adrian's proposed fix for 6.x. And I think it's too late to change the name of the region in 5.x... updates would make the blocks that were in the 'content' region disappear, no?

moshe weitzman’s picture

@webchick.- the patch changes a label, not the actual region name.

webchick’s picture

LOL. :) I should learn this Pea Aitch Pea thing I hear all you guys talking about all the time. :P

Sorry. Early. :P

RobRoy’s picture

I agree that we should make content a block for 6.x, but think that changing the label is an non-intrusive intermediate step for 5.x that would clear up confusion. But maybe it's too minor to bust the string freeze, so if that's the case let's just head towards making content a block.

catch’s picture

Status: Needs review » Needs work

I agree this should be "below content" or similar, but it needs a re-roll.

catch’s picture

Status: Needs work » Active

Not just a reroll, regions are set completely differently now.

sym’s picture

StatusFileSize
new600 bytes

Wouldn't this be better in the theme, rather than the engine? There are some themes that might allow blocks to show above the content, and this patch would be even more non-intuitive in that case.

dvessel’s picture

Status: Active » Needs work

Do it from system_theme_default. The patch only applies to Garland.

sym’s picture

StatusFileSize
new630 bytes

Ok, here is the patch using system_theme_default().

The point I was trying to make was that each theme should control the wording and the position rather then the system or engine control it.

For example, out of the core themes:

* bluemarine shows the 'content' area at the bottom of the middle column.
* chameleon shows it at the top of the left column.
* marvin shows it at the top of the left column.
* garland, minnelli and pushbutton show it at the bottom of the middle columm.

So if 2 of the core themes don't show the block 'below content' as the patch implies, should it be the default? If so, we should patch those themes to change the wording, however I think 'content' is a good default, with each theme changing it as my last patch for garland did.

dvessel’s picture

Status: Needs work » Reviewed & tested by the community

sym, I don't understand your point. Any blocks assigned to "content" will *always* fall below it. If a theme has a region above it, then the theme should label it as such.

Also, themes can override the labels and ordering.

Patch applies with some fuzz. Doesn't need a re-roll, right?

sym’s picture

StatusFileSize
new630 bytes

dvessel: sorry, I made a stupid mistake when testing...ignore me!

Patch re-rolled, tested and working here.

dvessel’s picture

Status: Reviewed & tested by the community » Needs review

Hrm, I just realized that we don't apply weights anymore so this is iffy. Thanks for re-rolling and sorry.

The way it is presented now, it should simply label the region name. Not instruct where it will end up.

decibel.places’s picture

You can always reposition the block(s) with css

I did that for the search block at http://4m.netsperience.org/ which I put at the top above the content next to the primary links menu. (I am not using a header region, only left sidebar and content)

I had to remove the search block because of an issue in Drupal 5.7, the search block opened the search page (search/node) without results, so I went back to using the theme search form.

But the search block was placed exactly where the theme form block is placed (also with css) above the rest of the content.

general need’s picture

With deepest respect... it isn't as obvious as you think it is. In fact, its quite a hassle quite often when a block goes below content. Why cant they go above? It seems very reasonable to me.

Again, this was said with respect.

ultimateboy’s picture

Status: Needs review » Closed (duplicate)

Honestly, I think this is not a decent approach. Much better is to add content_top and content_bottom regions which is discussed here: #378916: Split content region into content_above and content_below. I think we should move in that direction.