瀏覽代碼

Change block name on about page and 404

Edd Baldry 8 年之前
父節點
當前提交
0877b62574
共有 2 個文件被更改,包括 6 次插入4 次删除
  1. 2 2
      bakerydemo/templates/404.html
  2. 4 2
      bakerydemo/templates/about_page.html

+ 2 - 2
bakerydemo/templates/404.html

@@ -4,8 +4,8 @@
 
 {% block body_class %}template-404{% endblock %}
 
-{% block content %}
+{% block content-header %}
     <h1>Page not found</h1>
 
     <h2>Sorry, this page could not be found.</h2>
-{% endblock %}
+{% endblock content-header %}

+ 4 - 2
bakerydemo/templates/about_page.html

@@ -1,13 +1,15 @@
 {% extends "base.html" %}
 {% load wagtailimages_tags %}
 
-{% block content %}
+{% block content-header %}
     {{ page.title }}
 
     <div class="image">
         {% image page.image width-500 as photo %}
               <img src="{{ photo.url }}" width="{{ photo.width }}" height="{{ photo.height }}" alt="{{ photo.alt }}" />
     </div>
+{% endblock content-header %}
 
+{% block content-body %}
     {{ page.body }}
-{% endblock content %}
+{% endblock content-body %}