July 2017
Intermediate to advanced
456 pages
11h 32m
English
We already have a page.html.twig template in our theme's template folder. For demonstration purposes, let's clean it up a bit and only focus on the page.content region.
Begin by opening page.html.twig and modifying the markup as follows:
<div class="layout-container"> <main role="main"> <div class="layout-content"> {{ page.content }} </div> </main> </div>
Make sure to save the template; unlike most times, we do not need to clear the cache this time since the template was already registered with our theme layer.
If we refresh the browser, our page should look a little cleaner. However, one thing to note is that if our site does not contain any content then we will be presented with what Drupal calls the river of news, which ...
Read now
Unlock full access