Considering that normally in Drupal, blocks may not be placed through standard administration into multiple regions, I assume you're directly embedding a block into the page content with PHP. Assuming you're embedding it directly, I believe that page content will be built before the blocks are. Depending on what you're trying to do, you might have more luck simply using CSS selectors like #main-content .block-module-delta. If you truly need a unique ID numbered by region (perhaps for JS?) your easiest route may be to simply assume that the body will be numbered higher than the other regions for the aforementioned reason.

Aaron

Lee Rowlands wrote:

Hi

The number in the block id comes from the ‘delta’ used to define the block by the module in hook_block, not the order in which they are rendered.

Lee

 

>The reason behind this is that I want a certain block that is generated by a certain module to be numbered based on its >appearance inside a page. I'm surprised however, that the block rendered in the body gets a #1 and the one in the >header gets #2 although the one in the header was printed before the one in the body and although the header region >was declared before the body region in the theme .info file.




-- 
Aaron Winborn

Advomatic, LLC
http://advomatic.com/

Drupal Multimedia available now!
http://www.packtpub.com/create-multimedia-website-with-drupal/book

My blog:
http://aaronwinborn.com/

Reply via email to