[support] block.tpl.php CSS issue
Shai Gluskin
shai at content2zero.com
Thu Sep 30 16:13:18 UTC 2010
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?
>
>
>
> --
> Gary Broyhill
> Webmaster
> Lenoir-Rhyne University
> www.lr.edu
> gary.broyhill at lr.edu
> (828)328-7379
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100930/6588e4de/attachment.html
More information about the support
mailing list