[support] support Digest, Vol 94, Issue 1

Broyhill, Gary Gary.Broyhill at lr.edu
Fri Oct 1 13:36:10 UTC 2010


Shai,

That helps ... I guess I will need to find another way to deal with the style issues then. I am running a multisite setup with one theme in sites/all/themes, and have created CSS for "block-block-2" (for example) that I want to apply across all sites. In most of the sites, block-block-2 is my right sidebar, but for a couple it's the center image. I guess because the sites have different combinations of modules, the content of block-block-2 is potentially going to be different for each site? I am not sure how to compensate for this without adding an overriding style sheet for the sites that vary from my setup.  I have 45 subsites and it's getting to be a bit messy.

Gary

---------------------------------

Date: Thu, 30 Sep 2010 12:13:18 -0400
From: Shai Gluskin <shai at content2zero.com>
Subject: Re: [support] block.tpl.php CSS issue
To: support at drupal.org
Message-ID:
        <AANLkTi=htNU-4=LCLey3RUqdfQwyQ_CqmQWj+yd1UH=h at mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"

Hi Gary,

It's a bit confusing... and different themes deal with it differently. But
the underlying concept here that you are missing is that a module must be
responsible for a block. So in the case of "block-block-1" it is the block
module that is responsible. The menu module (as many other modules) also
creates blocks. So you might see "block-menu-1". For each controlling
module, the numbering starts over.

But some themes don't use the "delta" or at least not in certain situations.
Like I just looked at a site (I think I used Genesis there) where I saw
"block-menu-nav" where "nav" was the name of the menu. There was no delta.
And on another site using Zen and Panels I saw a block in a panel get
"pane-menu-block-1. So now I've confused you. But I think I've gotten you
over the hump here, conceptually, yes? A module always "owns" a block.

best,

Shai

On Thu, Sep 30, 2010 at 11:27 AM, Broyhill, Gary <Gary.Broyhill at lr.edu>wrote:

>  I?ve got a CSS problem related to block.tpl.php . I was looking at the
> API for block.tpl.php, and I?m a little confused over how Drupal assigns the
> block-block-x  ID to come up with block-block-1, block-block2, etc.
>
> >From the API:  <div id="block-<?php print $block->module .'-'.
> $block->delta; ?>" class="block block-<?php print $block->module ?>">
>
> So I see that the ID value comes from "block-<?php print $block->module
> .'-'. $block->delta; ?>" but where its the numbering controlled?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20101001/c883f1e4/attachment.html 


More information about the support mailing list