Well there is a lot you can do to do that. You'll have to override theme_blocks though most likely. The block it self is built in the block_list function that is called from theme_blocks. Unfortunately the hook_block does not pass the region to the block when rendering it, but as I said if you override theme_blocks you will be able to grab the blocks after they are compiled but before they are rendered and add whatever you need to add after checking $block->module and $block->delta based on $block->region.<br>
<br>Check it out and you'll get a better idea. <a href="http://api.lullabot.com/theme_blocks">http://api.lullabot.com/theme_blocks</a><br clear="all">-----<br>***NEW CELL PHONE # Please Update(See Below)***<br>Adam A. Gregory<br>
Drupal Developer & Consultant<br>Web: AdamAGregory.com<br>Twitter: <a href="http://twitter.com/adamgregory">twitter.com/adamgregory</a><br>Phone: 910.808.1717<br>Cell: 919.306.6138<br>
<br><br><div class="gmail_quote">On Mon, Mar 22, 2010 at 10:32 AM, Ashraf Amayreh <span dir="ltr"><<a href="mailto:mistknight@gmail.com">mistknight@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Thanks for the replies. You're right, the regions do render as declared
inside the .info file, but knowing that still doesn't solve the issue.<br>
<br>
For example, some regions are added through preprocess
(theme_preprocess_node) which are rendered on node pages before the
rest of the regions. Anything inside the node.tpl.php is also rendered
before all other regions. So you still can't guarantee that one region
is rendered before another. What I need is to generate javascript
inside blocks according to their placement on the page. What I tried
was placing a static variable inside hook_block on $op = view and
incrementing that, but as I showed, this didn't solve the problem
because you can't be sure what regions will be rendered in what order.<br>
<br>
The only way I see it is to somehow modify the fully rendered page HTML
before it's sent to the browser using regular expressions. Is there
a way to do that? And if doable, how costly in performance would it be?<br>
<br>
-- <br>Best Regards,<br>Ashraf Amayreh<br>CEO | O-Minds<br>Cell. 962 78 8099997<br>Tel. 962 6 5655150<br>Fax. 962 6 5675150<br><br><a href="http://o-minds.com" target="_blank">o-minds.com</a><br>web development | web design<br>
user experience | branding design<br>
</div>
</blockquote></div><br>