Adding our Global Header
Our website has several global components that were present on our home page 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, all we need to do is simply copy the header
markup from the page--front.html.twig
template.
Open
page.html.twig
and delete the entire contents.Open
page--front.html.twig
and copy the following markup:<header class="header" role="banner"> <div class="header-top"> <div class="container"> {{ page.header_top }} </div> </div> <div class="header-nav container"> {{ page.header}} {{ page.primary_menu }} </div> </header>
Paste the markup into
page.html.twig
.Note
One more very important item to keep in mind is that we will need to also add the page content region to our template. Failure to add the...