Drupal 8 installation and configuration:
an example site


Custom Blocks


In Drupal the web page is divided into regions which are defined by the theme. Page elements, as: contents, header, footer, menus are "blocks:", which can be placed in regions at user choice.

Custom blocks, containing HTML text or other fields, can also be created by the user. Here we will create a number of blocks for our test site.

The page for block management can be reached from the administration menu, it has two tabs: "Block layout" to place blocks in the page regions, and "Custom block library" to manage custom blocks.

The "Custom block library" tab is shown in the figure below; here we have two sub tabs: the tab: "Blocks" lists our blocks, "Block types" can be used to define new types of blocks, containing different fields, as images, text etc.

Here we will use the pre-defined "basic block" which has just a title and a "body", with HTML text. We want to create three custom blocks with images linking to the three main section of our site. We click on the button: "Add custom block".

blocks
We have to give a short a description; we write: "linktospecial". In the body field we place an image and a title; we can select an element on the body, then, with the chain icon, we can associate an HTML link to the element. We make both the title and the image a link to "/specials", our taxonomy page for the special section.
blocks
For the curious, this is the HTML code generated by the editor.
 
<p class="text-align-center">
  <strong><a href="/specials">Special Section </a></strong>
</p>
<a href="/specials"><img alt="Ioda, by Angela Vianello" 
    data-align="center" data-entity-type="file" 
    data-entity-uuid="5c5d93dd-6958-4633-b80f-97359d5967d9" 
    height="241" width="172" 
    src="/sites/default/files/inline-images/Ioda-byAngelaVianello.jpg" />
</a>

In the same way we generate custom blocks for the two remaining sections: "artists" and "pictures".

We can also make other blocks: for a custom footer, for some address, or blocks with links to social networks.