Exercise 1.3: Place Welcome message block
Many websites contain a welcome message on the homepage. In this exercise you’ll learn how to place a block of content into a page and manage block visibility settings. You will also learn how blocks are placed into page regions.
The screenshot below displays some blocks being placed in various footer regions. You will build a similar block in this exercise.
Add a custom block
Navigate to Structure → Block layout → Add custom block (/block/add).
Select "Basic text with Image". Note, the options you see here will depend on the theme that your site is using and will most likely differ on your agency website.
Fill out the form:
Block description: “Welcome to Government Jobs Portal”.
Body: “Government Jobs Portal is the official site to search and apply for jobs in the federal or state government. Be part of the bigger picture.”
Click the Save button.
Place custom block
Navigate to Structure → Block layout and locate the "Footer top 1" region. Click the Place block button next to the Footer top 1 region name.
Locate the block you created, by searching for its name “Welcome to Government Jobs Portal”.
Assign block to region
Next, you’ll need to assign the block to an area on the site.
Scroll down to the Region select element. Select Footer Top.
Finally, configure the block’s Visibility settings so the Welcome Message block only appears on the homepage.
Under the Pages section of the visibility settings.
Select the Show for the listed pages radio button.
Following the screenshot below, enter the text <front> in the Pages field. This will make sure the block is only displayed on the front (home) page of your site. Leave the other settings as-is.
Save the block.
After the page is saved, you’ll be redirected to the Block Layout page. If you have multiple blocks assigned to the same region (such as Footer top 1), these can be rearranged on that page. Press the Save blocks button.
Now go to the homepage of your site and view your new welcome message/block in the footer.
Tip: Blocks aren’t content so they won’t be displayed in the content listing. To view all custom blocks go to Structure → Block layout → Custom block library .
Last updated