Adding our global footer

Our website has several global components that were present on our homepage that don't currently exist on our interior pages. One such item is the global header, which consists of the utility menu, logo, main menu, and search form block.

To add this section to our template, we need to simply copy the footer markup from the page--front.html.twig template:

  1. Open page.html.twig and delete the entire contents.
  2. Open page--front.html.twig and copy the following markup:
    <footer id="footer" role="contentinfo"> <div class="container main-footer"> <div class="row"> <div class="col-md-4"> {{ page.footer_first }} </div> <div class="col-md-4"> {{ page.footer_second }} </div> <div class="col-md-4"> {{ page.footer_third }} </div> </div> </div> ...

Get Drupal 8 Theming with Twig now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.