Consistently override all page data in base template across all non-page views

pull/425/head^2
Thibaud Colas 2023-10-02 14:21:37 +01:00
rodzic 0e9ef17a2d
commit e47bc8b597
5 zmienionych plików z 16 dodań i 2 usunięć

Wyświetl plik

@ -2,6 +2,8 @@
{% block title %}404 - Page not found{% endblock %}
{% block search_description %}Sorry, this page could not be found{% endblock %}
{% block body_class %}template-404{% endblock %}
{% block content %}

Wyświetl plik

@ -15,7 +15,7 @@
| {{ settings.base.SiteSettings.title_suffix }}
{% endblock %}
</title>
<meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% endif %}">
<meta name="description" content="{% block search_description %}{% if page.search_description %}{{ page.search_description }}{% endif %}{% endblock %}">
<meta name="viewport" content="width=device-width, initial-scale=1">
{# Force all links in the live preview panel to be opened in a new tab #}

Wyświetl plik

@ -1,6 +1,12 @@
{% extends "base.html" %}
{% load wagtailimages_tags %}
{% block title %}{{ object.first_name }} {{ object.last_name }} Preview{% endblock %}
{% block search_description %}{{ object.job_title }}{% endblock %}
{% block body_class %}template-preview-person{% endblock %}
{% block content %}
<div>
{% image object.image fill-200x200-c100 class="blog__avatar" %}

Wyświetl plik

@ -3,8 +3,10 @@
{% if tag %}
{% block title %}
Viewing all blog posts sorted by the tag {{ tag }}
{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}: {{ tag }}
{% endblock %}
{% block search_description %}Viewing all blog posts sorted by the tag {{ tag }}{% endblock %}
{% endif %}
{% block content %}

Wyświetl plik

@ -3,6 +3,10 @@
{% block title %}Search{% if search_results %} results{% endif %}{% if search_query %} for “{{ search_query }}”{% endif %}{% endblock %}
{% block search_description %}Search{% if search_results %} results{% endif %}{% if search_query %} for “{{ search_query }}”{% endif %}{% endblock %}
{% block body_class %}template-search-results{% endblock %}
{% block content %}
<div class="container">
<div class="row">