>>more often than not you have a design flaw somewhere in your logic.
I would agree b/c the fact of the matter is you don't necessarily know what regions will even be available to you based on the theme. ----- ***NEW CELL PHONE # Please Update(See Below)*** Adam A. Gregory Drupal Developer & Consultant Web: AdamAGregory.com Twitter: twitter.com/adamgregory Phone: 910.808.1717 Cell: 919.306.6138 On Mon, Mar 22, 2010 at 11:41 AM, [email protected] < [email protected]> wrote: > That actually seems like a rather screwy thing to be doing in the first > place. :-) Perhaps you can explain what you're trying to accomplish and we > could figure out a better approach? IME, if you care about the order that > blocks are rendered in, or in which region they appear, more often than not > you have a design flaw somewhere in your logic. > > --Larry Garfield > > > On 3/22/10 9:32 AM, Ashraf Amayreh wrote: > >> 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. >> >> 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. >> >> 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? >> >> -- >> Best Regards, >> Ashraf Amayreh >> CEO | O-Minds >> Cell. 962 78 8099997 >> Tel. 962 6 5655150 >> Fax. 962 6 5675150 >> >> o-minds.com <http://o-minds.com> >> >> web development | web design >> user experience | branding design >> >
