Last updated May 9, 2018


Goal

Place the Opening hours and location block in the website’s sidebar.

Prerequisite knowledge

Section 8.1, “Concept: Blocks”

Site prerequisites

Steps

Placing a Block in a Region

  1. In the Manage administrative menu, navigate to Structure > Block layout (admin/structure/block). The Block layout page appears, listing the theme’s regions.
  2. Ensure that in the secondary tab the core Bartik theme is selected. Block placement is defined per theme.
  3. Locate the region Sidebar second in the list and click Place block next to it. The Place block window appears, listing all the blocks.
  4. Locate the block Opening hours and location and click Place block next to it. The Configure block window appears. Fill in the fields as shown below.

    Field name Explanation Example value

    Title

    Title to be displayed for the block

    Hours and location

    Display title

    Whether or not to display the title with the block

    Checked

    Region

    Which theme region to display it in

    Sidebar second

    You can also hide or display the block on specific pages. In the case of the Farmer’s market website you do not set any of these configuration options because you want to show the block everywhere.

    Block configuration page

  5. Click Save block. The Block layout page appears. You can drag blocks to change the order in which they will appear.
  6. Verify that the Opening hours and location block is listed in the Sidebar second region, and click Save blocks.

    The block has been placed on the sidebar of all pages that use the core Bartik theme.

    Page with a block placed on the Sidebar second region

Expand your understanding

  • Remove the Powered by Drupal block from the Footer fifth region by clicking Disable or Remove in the Operations dropdown button. Clicking Disable will let you enable the block easily later with the same configuration; if you click Remove and you want the block back, you would need to go through the steps in this topic to place it in a region again. Note that the names of the blocks that are provided by the core software, such as Powered by Drupal and User login, are shown in English on this page; see Section 2.7, “Concept: User Interface, Configuration, and Content translation” for an explanation.
  • Remove the Tools block from the Sidebar first region. This block is only visible to logged-in users.
  • Place the User login block in a region.
  • If you do not see the effect of these changes in your site, you might need to clear the cache. See Section 12.2, “Clearing the Cache”.