Using Views and Blocks

Views and Blocks allow the Site Manager to extract selected data and present it in a defined way on a page within a menu. It is the way Drupal handles 'Queries' on the database.

The procedure is reasonably easy to implement, once it has been learned. The Views procedure can produce output on a whole Page or in a Block. Blocks can be placed on a selected part of a defined page in the menu. The most important thing to appreciate is that  a complete Page created to show the result of the View (Query) cannot currently be fitted into the menu structure, but Blocks can, so the trick is to:

  • Define both a Page and a Block within Views to show the extracted data
  • Define where the Block is to go on a page and configure the Block to appear on a specific page already created in the menu  showing enough results from the query to satisfy most needs. The remainder of the results from the query can then be made to show on subsequent Pages. The latter fall out of the menu system and the back arrow has to be used to return to the menu, but by selecting an appropriate number of results to be shown within the Block, the menu structure holds for most times that the data is accessed.

The overall process is as follows:

  • Select Views, using Administer Site / Site Building / Views;
  • Create a view or clone an existing view and edit the cloned version;
  • Make sure that both Pages and Blocks are defined within the view and named correctly;
  • To configure the block: Select the Block within Site Manager / Site Building / Blocks. It will be at the bottom of the list under Disabled
  • Change the Region of the Block to Content Bottom and select Save Blocks, at the bottom of the page
  • Create a Page to appear in the appropriate menu structure and remember the node/xxxxx number
  • Identify the Block under the Content Bottom Region and configure this to appear on a the selected page node/xxxxx
    See to see how the Altarnun Image Gallery Block is associated with the Altarnun Image Gallery page.

Selecting the page within the defined menu structure will bring up the results of the View (Query). Some text can be added to the Body of the text which will appear before the Block.

The Help Notes will cover the Creation of new Views and in cloning of existing Views. The latter is probably all that is needed to extend a menu to a new Parish or Study Group. It is also the best way to see what needs to be defined to achieve a selected output.