Working with blocks

Blocks are particular ways in which information is displayed on a Drupal site.  Some come with a standard Drupal install (such as the “search” block).  Others may be part of contributed modules or views, and you can also create custom blocks.

These blocks can be placed in a particular “region” of your site which is determined by the theme you are using.  Regions usually include the main content area, sidebar regions, header and footer regions among others.

There are two main ways in which blocks are positioned: using the basic Blocks administration page and using the Context module.

In an Open Outreach site, blocks  are set using Context.  The Context module allow you to set “conditions” that lead to certain “reactions”.

If you want the change the placement of blocks that have been set using the context module you’ll need to follow these steps:

  • First, on the Modules page, enable the Context UI module. (admin/modules)
  • Under the Structure link in the toolbar, you will find Context. (admin/structure/context)
  • All the contexts will be listed, and the descriptions should help you choose which context you are looking for.
  • Click the edit button for the context you want to change.
  • Most likely you will leave all the other information the same and only change the reaction.
  • For example, if you want to move the social media “Follow”  block which is set to appear in the sidebar, choose the “social-follow-site” context and click edit.
  • Under the reaction section click on “blocks”.
  • It will show the block as appearing in the “sidebar second”.
  • Click the “X” to remove it from here.
  • To add it to another region, select from the right hand side the block you want to add (in this case “Site follow”) and then in the left hand column select the “Add” button for the desired region and save your changes.

If you want to stop a block from appearing, you have two choices:

  • Edit the context that shows the block, remove the block from "reactions", and save the context. This is a good choice if there are other reactions in the context that you might want to keep.
  • Simply disable the context by clicking its "Disable" link on the Context administration page.

You can also place blocks manually using the block administration page (admin/structure/blocks). This interface will only show you blocks set using this interface (not those set by context.)

  • Select the block you wish to have displayed and then select the region you wish it to go in.
  • You can also configure blocks here by clicking on the configure button beside a block.
  • This lets you alter other settings, for example to set it so a block only appears on the home page.
  • Save your settings.