Posted by josefg on June 15, 2012 at 12:37am
Sorry, I am new to Drupal and OpenOmega, so this may be obvious...
But how do I position a given block (in my case the block-search-form) in a region or zone of my choice in the template?
I am trying to modify a template that has put it in the header, but I want to move it to the sidebar.
TIA
Comments
Go to Structure | Blocks and
Go to Structure | Blocks and look for Search form.
Structure -> Blocks gives no effect
Your suggestion was the first thought that came to mind for me too, but it doesn't work. The 'Search form' appears in the branding region in spite of not being assigned to any zone by default. When I do assign it to a specific zone, it appears double instead (it is added in the new region, but also remains in the branding zone). Could it be that this has been hardcoded into the theme, and if so, how?
PS. I am working with the OpenPublic distribution
The base Omega theme doesn't
The base Omega theme doesn't hard-code a search form into the theme. I have no experience with Omega distributions. Go to Appearance | Settings | (yourthemename) | Debugging and make sure these checkboxes are checked:
That will turn on debugging. The go back to your site's home page. Now look for your search form. The region name should be right above your search form. Now that you know your region name, you can go back to Structure | Blocks and see what blocks are in that region. Figure out which block the search form is in and change it's region to "- None - ".
The zone is Branding, and Branding is empty
The zone where the search form is located is Branding, according to the debug info. But the Branding zone/region is already officially empty: 'No blocks in this region'.
The guys at OpenPublic must have done something creative here. Have to figure it out...
OK, then the next place to
OK, then the next place to look is Appearance | Settings | (yourthemename). Look at the bottom under TOGGLE DISPLAY for a checkbox that will turn the search form off.
OpenPublic organises its blocks using Context
In OpenPublic, they did indeed do something creative.. They arrange the location of blocks etc not in the default 'blocks' page, but instead they arrange the blocks for each page type using 'context'.
Go to Structure>Context, then find the context relevant to you, and hey presto, you will find a condition with blocks as the result. Reason they do this is you get an extra layer between the 'one size fits all' arrangement of 'blocks', so you can now have different blocks etc depending on the context. For example, your homepage can skip an entire sidebar, or have only one block, whilst the news pages add a news block that is absent everywhere else, and so on and so forth..
Much faster and much more elegant than having to define which pages an item is visible on through 'content' (where you would have to tell each and every individual piece of content where it should and should not show)
This was it!
Great, that was the answer to the riddle!
Clever design. Thanks for the help!