arrow-left

All pages
gitbookPowered by GitBook
1 of 5

Loading...

Loading...

Loading...

Loading...

Loading...

Exercise 1.6: Configure the related links menu block

The last step is to configure the new menu block.

  1. Go to Structure → Block layout and find the Related Links block. Click Configure.

  2. Configure the Title. We’ll leave it at the default, but this is where you can:

    • Enter a new title.

    • Unselect the Display title checkbox to remove the block title.

  3. In the Visibility settings you’ll notice options for:

    • Pages - show or hide the block on specific pages.

    • Content Types – display the block alongside specific content types.

You’ll often need to alter a block’s Pages visibility settings. For this exercise, we want the Related Links menu to appear only on the About us page we created earlier, and the homepage of our site.

  1. Under Pages → Show for the listed pages, enter the URL paths of the pages that we want to display the block, e.g. /about-us-0

  2. On a new line in the Pages text area, enter <front>. This will ensure your Related Links menu block is displayed on the front (home) page of your site.

  3. Click Save block

The Related Links menu will only be displayed on the front and About us pages.

Roles – display the block to specific roles.

.
Image of Block Visibility settings
Image of Block Visibility settings

Exercise 1.7: Rearrange the main menu

Edit the main menu by re-ordering the menu items.

Exercise 1.5: Assign the related links menu block to a region

When you create a new menu, GovCMS automatically creates a menu block for the menu. Now we need to assign this menu block to a region on the website.

  1. Go to Structure → Block layout (/admin/structure/block).

  2. Scroll down and find the Footer middle 2 area and click the Place block button.

  3. Search the list for - Related Links. Select Menus block “Related Links”.

  4. Click Place block.

  5. Uncheck the option to "Display title".

  6. Click Save block.

  7. Click Save blocks in the Block layout page.

  8. Check your site to make sure the Related Links menu block is in the Footer.

Next, we’ll restrict visibility so it doesn’t show throughout the site.

Place block in the Footer middle 2 region
Related Links block in the Footer

Exercise 1.4: Build the related links menu

In this exercise, we’ll add a Related Links menu item. This can be broken into two stages:

hashtag
Adding the custom menu

  1. Go to the menu administration page – /admin/structure/menu - hover over Structure on the Admin menu then click Menus. Click on the Add menu button at the top right of the page.

  2. Type in the name of our menu in the Title field: Related Links.

  3. Type in a menu description in the Administrative summary field. While the description is optional, it helps site administrators understand the different menus, especially if the site has lots menus.

  4. Click Save to create the new menu.

hashtag
Add menu items to the related links menu

Now that you’ve created the custom menu, you need to add in the links to existing pages. You can do this in one of two ways:

  • Adding links to the menu when you edit the specific content pages/section.

  • Adding the items manually via the menu interface.

hashtag
Add Related links menu option to Basic page content type

  1. On the Admin menu hover over Structure → Content types, then click on Page.

  2. Scroll down and click on the “Menu settings” item. Under Available menus, enable Related links.

  3. Click Save content type.

hashtag
Add several new Pages to build menu links

Add content using the Page content type and create the following new pages:

  • About us

  • FAQs

  • Disclaimer

Make sure you select "Provide a menu link" and select the parent item "Related links" for all pages. See the screenshot below for an example.

hashtag
View Related Links menu

On the Admin menu hover over Structure → Menus then click on Related links. The new pages you created now appear in this admin area.

You can also add the links manually by following these steps:

  1. In the menu administration page, click Add link at the top of the Related links. At the menu link creation page type in these settings:

    • Link: type About and select About us.

    • Description:

Finally, you can re-order the links on your menu.

  1. Go to Structure → Menus to see a list of all your site’s menus.

  2. Click on Edit menu to the right of the Related links menu entry. You should see a list of the menu items we just created as in the previous screenshot.

  3. You can drag and drop the menu items to re-order them. Then click Save configuration.

circle-info

Note: Another way to change the menu order is to change the ‘weight’ of the menu item when you’re editing the content.

Privacy policy
Jobs Posting About Us page.
  • Menu link title: About us

  • Leave the other settings at their defaults and click Save.

  • Repeat the steps above for any remaining menu items.

  • Add menu screen
    Adding Related links to Page content type
    Creating About us page and adding a menu link to Related Links
    Showing links in the Related Link Menu
    Image of reordering related links menu

    Footers

    Footers are often used to provide global ‘quick links’ for site visitors. For the Government Jobs Listing site, the Related Links menu in the footer will contain links to the basic page content of the Government Jobs Listing website (FAQs, About us, etc.).