Template-Quelle: cms/pages/_base.html

{% extends 'core/layout/subheader.html' %}
{% load eshop_tags canonical_tags %}

{% block title %}{{ page.meta_title }} - {{ block.super }}{% endblock %}

{% block bots %}
    {% if not page.metatags.robots %}
        {{ block.super }}
    {% endif %}
{% endblock %}

{% block meta %}
    {{ block.super }}
    {% for name, content in page.metatags.items %}
        <meta name="{{ name }}" content="{{ content }}">
    {% endfor %}
{% endblock %}
{% block meta_opengraph %}
    {% for property, content in page.opengraph_metatags.items %}
        {% if property == "og:image" and content %}
            <meta property="{{ property }}" content="{% thumbor_url content.path width=1200 height=960 fit_in=True filters=content.thumbor_filters %}">
            <meta property="{{ property }}:width" content="1200">
            <meta property="{{ property }}:height" content="960">
            {% if content.alt_text %}
                <meta property="{{ property }}:alt" content="{{ content.alt_text }}">
            {% endif %}
        {% else %}
            <meta property="{{ property }}" content="{{ content }}">
        {% endif %}
    {% endfor %}
    {% if page.opengraph_metatags.type == "article" %}

    {% endif %}

    {% get_alternate_urls page True as alternates %}
    {% for lang_code, href in alternates %}
        {% if lang_code == LANGUAGE_CODE %}
            <meta property="og:url" content="{{ request.is_secure|yesno:"https,http" }}://{{ request.META.HTTP_HOST }}{{ href }}">
        {% endif %}
    {% endfor %}
{% endblock %}

{% block subheader %}
    {% with page.attributes.cms_headerimage as image %}
        <header
            class="
                {% block subheader-class %}
                    shopsubheader
                    shopsubheader--cms
                    {{ image|yesno:"shopsubheader--bg-image," }}
                    {% if image %}
                        shopsubheader--bg-image--{{ page.attributes.cms_header_font_color|default:"white" }}
                    {% endif %}
                {% endblock %}
            "
            {% if image %}
                style="
                    background-image: url('{% thumbor_url image.path filters=image.thumbor_filters %}');
                    {% if page.attributes.cms_headerimage_position %}
                        background-position: {{ page.attributes.cms_headerimage_position }};
                    {% endif %}
                "
            {% endif %}
        >
            <div class="container">
                {% block breadcrumbs %}
                    <ul class="breadcrumbs">
                        {% block crumbs %}
                            <li><a href="{% url "cms-page-index" %}">{{ _("Home") }}</a></li>
                            {% for crumb in page.valid_breadcrumbs|slice:"1:" %}
                                {% if crumb.is_hidden or not crumb.url %}
                                    <li>{{ crumb.title }}</li>
                                {% else %}
                                    <li><a href="{{ crumb.get_absolute_url }}" target="{{ crumb.target }}" {% if crumb.target == "_blank" %}rel="noopener"{% endif %}>{{ crumb.title }}</a></li>
                                {% endif %}
                            {% endfor %}
                        {% endblock %}
                    </ul>
                {% endblock %}
                <h1>{% block subheader-title %}{{ page.title }}{% endblock %}</h1>
                {% block subheader-extracontent %}{% endblock %}
            </div>
        </header>
    {% endwith %}
{% endblock %}