Hi,

I noticed with Drupal 5 (as well as 4.x) that system blocks are not included in the weighting against new blocks users may add.

Heres a senario in order to understand and replicate this issue in full:
1) Create a new block (named Top Content)
2) Enable the block and set it to content region
3) Specify the priority/weight of the block (since we want it to be at the top, I used -10)

Problem: This placed the block below the main content of Drupal!

We wanted the block to be above the content block and instead, it was placed at the bottom (indeed above any other content blocks that are not system blocks). There are many ways to fix this indeed. An example of one work around is by creating more block regions on your theme and calling it "block-region-top", "block-region", "block-region-bottom". System blocks in this instance would be placed in "block-region" so that blocks can be placed above/below it.

But to be honest, the logical solution is Drupal SHOULD preset all system blocks to weight=0. I am not asking for major changes to the blocks overview page or to show system blocks. Just to allow site admins to freely determine the natural positioning of their blocks against system blocks. This should be 100% based purely on the weight in that particular region regardless of whether its a system block/module or not.

This would then enable a site admin to place blocks above (or indeed below) Drupal's menu, or above the main content or even above the header/logo and site footers.

Note: This should not be classed as a new feature request, as it is related to practicality and common sense. If this is already intended or fixed in the new release please accept my appology for reposting :)

Comments

greggles’s picture

In a typical theme the content in the middle of the page is not a block, so it doesn't get weights nor figured into block weighting.

I believe this is a "problem" that should get solved in the theme created by your individual site and cannot be fixed in Drupal core. You can already build these kinds of things into a customized theme file.

I believe this issue deserves a "won't fix" but leave it for someone else to second that perspective and take the action.

chx’s picture

Status: Active » Closed (won't fix)
RobRoy’s picture

The way to fix this in your theme is to define a pre_content region before your content region:

So you'd have this in page.tpl.php:

print $pre_content
print $content

And in template.php something like:

/**
 * Declare the available regions implemented by this engine.
 */
function mythemename_theme_regions() {
  return array(
    'left' => t('left sidebar'),
    'right' => t('right sidebar'),
    'pre_content' => t('above content'),
    'content' => t('content'),
    'header' => t('header'),
    'footer' => t('footer'),
  );
}
BioALIEN’s picture

Yes, as stated above, this can indeed be fixed by theme/style. However, this is not directly related to the theme creation. My point is that this functionality should be implemented within Drupal itself without hacking the files.

By this, I dont mean Drupal should ship with a pre-content, content, post-content blocks for the body (main content column). Drupal should reoptimise the system blocks so that all of this can be configured via the Block Admin and using the existing weights system which is an excellent feature in its own rights.

Because this would enable users to add content in front of the Drupal menu, contents, and also above/below the header/footer blocks too. According to your proposal this would require a custom theme with an additional 8 blocks hacked into it.

Please review this issue again and do consider contributing a patch for the next beta release because I do believe its worthy of a fix.

greggles’s picture

Version: 5.0-beta1 » 6.x-dev
Category: bug » feature
Status: Closed (won't fix) » Postponed

You are describing a feature, not a bug. I've marked it as such.

Features will not be implemented in Drupal5 because 5 is frozen to usability and bugfixes only. So, I moved the version to 6.x.

BioALIEN’s picture

Version: 6.x-dev » 5.x-dev

This issue is related to usability ;)

I've changed this to the 5.x-dev branch for the sake of newbies who are unable to hack files and themes. If anybody would like to contribute a patch, be my guest. Else, we will move this to 6.x-dev.

michelle’s picture

Version: 5.x-dev » 6.x-dev

Putting this back at 6.x. It's not gonna happen in 5.x.

Michelle

BioALIEN’s picture

Title: Block Weight vs Drupal System Blocks » Drupal System Blocks - Including header, footer and content into the block system
Status: Postponed » Active

I think its time we open this issue once again. I've highlighted what's available now with Drupal 5's improvement to the block system and what is still lacking.

1) Drupal already displays the admin menu as a block (Navigation block) so an admin can place blocks above/below this. Perfect!
2) We need something similar for header (containing the logo, site title, slogan, search etc) - which can be individually enabled/disabled via theme (already present).
3) We need something similar for footer (containing the copyright field etc) - which can be edited via site configuration (already present).
4) Depending on the general view, we need something similar for the body content (containing the main site output).

All of the above should ideally be set to weight = 0.
Benefit: it would allow the manipulation of the site's content. Reordering and rearranging simple things like making the copyright text stay at the bottom of the site (below a block set to region=footer or having a mission statement like block above all site content site-wide without having to hack a theme with lots of block regions.

This is trivial in terms of coding but it has huge usability gains for webmasters. Especially ones not comfortable with editing php code, or hacking their own themes. I am champion this for inclusion into Drupal 6. I understand the theme system but I am not too familiar with the block system. Anybody willing to help me with this?

pasqualle’s picture

Version: 6.x-dev » 7.x-dev
gábor hojtsy’s picture

Status: Active » Closed (duplicate)

This issue is in part duplicate to #428744: Make the main page content a real block. In other parts it is duplicate to my other efforts documented at http://hojtsy.hu/blog/2009-apr-09/mission-improve-page-regions-drupal-7 Maybe all my efforts will still not cover this whole issue, but please continue supporting the linked issues, so we can get as much of this as possible to Drupal 7. It is a lot of work with migration paths, well named regions and blocks and so on.