When you visit a node page in Drupal – or any other page – Drupal pulls out the content corresponding to the current URL and formats it to make it possible for a web browser to display. On the URL node/1, for example, Drupal displays the content for the node with ID 1. But it is not just the content of node one that is displayed; there may also be elements like menus, search forms, related content, latest comments on the site, and much more.
Both the main content and the other elements are displayed as blocks, placed in one of the regions of the website. These blocks can be moved around, and there are basic, as well as more sophisticated, ways of adding new blocks to your website.
Figure 3.1: Blocks are placed in one of the regions of the website. The Demonstrate block regions link on the administration page for blocks gives an overview of the regions available in your current theme.
You can reach a list of all available blocks on the site by using the administration toolbar to select Structure and then Blocks. (See figure 3.2) The blocks are grouped by the region where they are placed – which could, for example, be Sidebar first or Content. There is also a list of blocks under the subheading Disabled, meaning they don't show up at all. You can move blocks to a new region by using the select list of region names, or by simply clicking on a block's sorting arrow and dragging it to another region's subheader.
Above the list of blocks is the link Demonstrate block regions. It leads to a page where all regions are printed clearly on an empty site template, making it easy to get an overview of the available regions. (See figure 3.1) Don't miss the Exit block region demonstration link to return to the block list.
Figure 3.2: The administration page for blocks shows all the blocks available on the site, grouped by the regions in which they are placed.
TIP: The theme your site uses will dictate which regions are available. (Themes dictate the presentation of Drupal sites – see Appendix 1 for more details.) You may use the tabs on the block administration page to distribute your blocks for every enabled theme. On a standard installation, the Seven theme is used on administration pages, while Bartik is used for all other pages.
|03.1 Region overview.png||54.03 KB|
|03.2 Blocks (cropped).png||138.82 KB|