material_base-8.x-2.x-dev/templates/layout/page.html.twig
templates/layout/page.html.twig
{#
/**
* @file
* Theme override to display a single page.
*
* The doctype, html, head and body tags are not in this template. Instead they
* can be found in the html.html.twig template in this directory.
*
* Available variables:
*
* General utility variables:
* - base_path: The base URL path of the Drupal installation. Will usually be
* "/" unless you have installed Drupal in a sub-directory.
* - is_front: A flag indicating if the current page is the front page.
* - logged_in: A flag indicating if the user is registered and signed in.
* - is_admin: A flag indicating if the user has permission to access
* administration pages.
*
* Site identity:
* - front_page: The URL of the front page. Use this instead of base_path when
* linking to the front page. This includes the language domain or prefix.
*
* Page content (in order of occurrence in the default page.html.twig):
* - node: Fully loaded node, if there is an automatically-loaded node
* associated with the page and the node ID is the second argument in the
* page's path (e.g. node/12345 and node/12345/revisions, but not
* comment/reply/12345).
*
* Regions:
* - page.navbar
* - page.drawer
* - page.header
* - page.actions
* - page.main_top
* - page.content_above
* - page.breadcrumb
* - page.highlighted
* - page.help
* - page.content
* - page.content_secondary
* - page.sidebar_first
* - page.sidebar_second
* - page.content_below
* - page.main_bottom
* - page.footer
* - page.overlay
*
* @see template_preprocess_page()
* @see html.html.twig
*/
#}
{% if page.drawer %}
{% if drawer_style == 'permanent' or drawer_height == 'full' %}
{% set drawer_full = TRUE %}
{% else %}
{% set drawer_below = TRUE %}
{% endif %}
{% endif %}
<div class="page">
{% if drawer_full %}
{{ page.drawer }}
{% endif %}
{% block page_container %}
<div class="page-container layout-container{{ page_layout ? ' layout-container--node' : ' layout-container--page' }}{{ drawer_full ? ' page-drawer-page-content'}}">
{% endblock %}
<div class="page-container__overlay"></div>
{% if page.navbar %}
{{ page.navbar }}
{% endif %}
{% if drawer_below %}
{{ page.drawer }}
{% endif %}
{% block navbar_adjust %}
<div class="page-navbar-adjust{{ navbar_style ? ' page-navbar-adjust--' ~ navbar_style }}{{ navbar_fixed ? ' page-navbar-adjust--fixed' }}{{ drawer_below ? ' page-drawer-page-content'}}">
{% endblock %}
{% if page.header %}
<header class="page-header" role="banner">
<div class="page-header__bg">
<div class="page-header__container">
<div class="page-header__content">
{{ page.header }}
</div>
</div>
</div>
</header>
{% endif %}
{% if page.actions %}
<div class="page-actions">
<div class="page-actions__container">
{{ page.actions }}
</div>
</div>
{% endif %}
<main class="page-main" role="main">
{% if page_layout %}
{# layout controlled by confuguration #}
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #}
{% block content %}
{{ page.content }}
{% endblock %}
{% else %}
{# layout controlled by template #}
{% if page.main_top %}
<div class="main-top">
{{ page.main_top }}
</div>
{% endif %}
<div class="main-content">
<div class="main-content__container">
{% if page.content_above %}
<div class="page-content-above">
{{ page.content_above }}
</div>
{% endif %}
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #}
<div class="main-content__content">
<div class="page-content__wrapper">
<div class="page-content-primary">
{{ page.breadcrumb }}
{% if not messages_fixed %}
{{ page.messages }}
{% endif %}
{{ page.highlighted }}
{{ page.help }}
<div class="page-content layout-content">
{{ block('content') }}
</div>
</div>
{% if page.content_secondary %}
<div class="page-content-secondary">
{{ page.content_secondary }}
</div>
{% endif %}
</div>
{% if page.sidebar_first %}
<aside class="page-sidebar page-sidebar--first layout-sidebar-first" role="complementary">
{{ page.sidebar_first }}
</aside>
{% endif %}
{% if page.sidebar_second %}
<aside class="page-sidebar page-sidebar--second layout-sidebar-second" role="complementary">
{{ page.sidebar_second }}
</aside>
{% endif %}
</div>
{% if page.content_below %}
<div class="page-content-below">
{{ page.content_below }}
</div>
{% endif %}
</div>
</div>
{% if page.main_bottom %}
<div class="main-bottom">
{{ page.main_bottom }}
</div>
{% endif %}
{% endif %}
</main>
{% if page.footer %}
{{ page.footer }}
{% endif %}
</div>
</div>
{% if messages_fixed %}
<div class="messages__wrapper messages__wrapper--fixed">
<div class="messages__container">
{{ page.messages }}
</div>
</div>
{% endif %}
{% if page.overlay %}
{{ page.overlay }}
{% endif %}
</div>
