
Home → First Steps → Block Layout
Block Layout
Block Layout helps create your overall page structure.
- Why use blocks?
- Block layout and regions
- Place blocks
- Configure visibility
- Add custom block: Search bar
5.1. Add custom block: Section - Add default block: Social media buttons
Drupal offers a number of default blocks to be placed within the block layout. As these are not part of picturemaxx Drupal, please refer to Drupal site for more information.
1. Why use blocks?
With blocks, you can manage the position of reusable page elements within the site layout.
-
Navigate to Structure → Block Layout in Main Navigation Menu to:
- Select a region of the site to place a block of reusable content there.
- Use default blocks and add custom blocks.
- Easily reposition a block within regions.
- Control on which pages exactly a block will appear.
-
The Custom block library has the following block types ready for you (Structure → Block Layout → Custom block library):
- Awards – allows granting awards for the content suffix area.
- Basic block – offers a basic layout that contains a title and a body.
- Search bar – adds a search bar for your webshop.
- Section – allows adding different paragraph types like a regular section, a form or a spacer.
Learn more about the regions in which the blocks are placed in the next step: 2. Block layout and regions
-
When opening the Block layout, you will find a structure that we have predefined to serve as a starting point for your website. Here you will also find some default blocks, for example:
- Header Menu – Contains the login and registration links and icons (upper right corner of a web page).
- Language Switcher – We have placed the language switcher next to the header menu by default.
- Site branding – Contains the logo of your website.
- Main navigation – We have placed the main navigation in Navigation by default.
Learn more about the regions in which the blocks are placed in the next step: 2. Block layout and regions
2. Block layout and regions
You can place blocks into available theme-dependent regions. Check out the tabs below (Header, Navigation, etc.) for the corresponding regions that are available for the picturemaxx Base Theme.
-
This is the Block layout setup page of the picturemaxx Drupal demo page:
-
The Header Menu and Language Switcher blocks are set in the Header Menu region by default.
-
The Site Branding block is set in the Header region by default.
-
The Main navigation block is set in the Navigation region by default.
-
Header Suffix is an ideal region to place additional site elements (e.g. Search bar).
-
When you log in as Admin, the tabs of the content menu appear in the Content Prefix region.
NOTE: We do not recommend to change this setting.
-
As you can see in the Setup page screenshot, we have not placed any blocks in the Content area. This area is designed individually for most websites, so a standardized block rarely makes sense here.
-
The Content Suffix area is ideal for placing Custom blocks. On the picturemaxx Drupal demo page we have decided to use a newsletter registration form.
-
The doormat of a website can be a site map or directory that usually appears at the bottom of a page, often in the footer, or in our case right above the actual footer in our Block layout. It acts as a roadmap when a landing page has a series of pages to link to.
-
The footer of a website is the section you’ll find at the very bottom of a website. It usually stays the same on every page of the site and contains helpful information like contact details, links to important pages (like Privacy Policy or General Terms and Conditions), social media icons (Shariff Sharing Buttons), and sometimes a newsletter signup.
3. Place blocks
-
- Navigate to Structure → Block layout.
NOTE: Only the picturemaxx Base Theme is relevant for your settings. Just ignore the themes Claro, Seven, and Gin. - Locate the region of the site (Header, Content, etc.) where you want to place the block. Click Place block next to the region.
- In the Place block dialog, filter or scroll the list of available blocks to find a desired block. Click Place block next to it.
- In the Configure block dialog, decide whether to display the title, define the visibility of this block, and double check the selected region.
- Navigate to Structure → Block layout.
-
For example, to place Search Bar beneath the page header:
1. Click Place block next to Header Suffix.
2. The Place block dialog lists all the blocks both offered by the system and custom-made by you. Find a required block and click Place block.
4. The Configure block dialog offers the following options:
- Display title to use the block name as the block's title on the page.
- Visibility to control the block's visibility for certain pages, roles, etc. If no changes are made here, by default, the block will appear on every page of your site. See 6. Configure visibility below.
- Click Save block to display the custom block within the selected region.
5. The Search Bar will now appear just below the main navigation on every page of the website.
-
To place a block to another region within the site layout:
In Structure → Block layout:
- drag and drop a block to other position within the layout, or
- select a position from the dropdown list in the Region column.
Remember to save your progress by clicking Save blocks at the bottom of the page.
The video below shows how to access the options.
-
4. Configure block visibility
It's useful to be able to display blocks everywhere at once. But on some pages you might want to make an exception.
-
To configure block visibility:
- Navigate to Structure → Block Layout.
- On the Block Layout page, select a block and click Configure.
- On the Configure Block page, you can choose to show or hide the block title and add exceptions to the block's visibility:
Select Pages in the Visibility list and enter page paths to show/hide the block on those pages.
The video below will walk you through the procedure.
-
Hide a default block of social media icons on a specific page. The same settings can be applied on any other block.
5. Add custom block: Search bar
You can place a search bar to use it for your webshop. Navigate to:
- Structure → Block layout → Add custom block.
- Select the Searchbar option.
-
-
Block description
Add a brief text describing your block.Search Field Label
Enter a text to appear within your bar to motivate visitors to search for your images, e.g., Search for...Webgate Search URL
Enter your webshop's URL. Contact picturemaxx Professional Services for an appropriate link.Use main background toggle
Activate to apply the main background configured in the theme settings. Otherwise, the transparent background is applied for the block.
Sticky toggle
Enable the option to fix the search bar in the same position as the user scrolls down.Use advanced search toggle
Activate the advanced search based on the filters and classifications set in picturemaxx BACKSTAGE.
Important: Requires BACKSTAGE API key and default settings configuration (e.g.,website ID). Contact us at support@picturemaxx.com for details and guidance.Autocomplete group
Set up the autocomplete feature based on classifications defined in picturemaxx BACKSTAGE.
Important: Requires BACKSTAGE API key. Contact us at support@picturemaxx.com for details and guidance.Revision information
Add comments about the changes you made.
5.1. Add custom block: Section
You can tailor a paragraph type (for example, Columns,Text & Media or Form) and use it across your website. To build a Section block, navigate to:
- Structure → Block layout → Add custom block.
- Select the Section option.
-
-
Block description
Add a brief text describing your block.Language
Select the custom block language code.Add Section
The available paragraph types are:Revision information
Add comments about the changes you made.
6. Add a default block: Social media buttons
-
- Navigate to Structure → Block layout.
- On the Block Layout page, scroll the list down to the Doormat region, and click Place block to view available blocks.
- In the Place block dialog, search for Shariff Sharing Buttons, and click Place block to add it.
The video below will walk you through the procedure.
NOTE: Shariff Sharing Buttons is a Drupal module that enables website users to share their favorite content without compromising their privacy.
-
Add a default block of social media icons to the Doormat region of a website:
Before publishing the page:
- Click Preview to make sure everything looks the way you want. You can preview any change before publishing it.
- To return to the Edit page, click Back to content editing.
- To make new content visible on your website, turn on the Content is live (published) option.
- Click Save to store your changes. The website content items are listed on the Content page.