Browse Source

Render promotions within content block of layout.html

Promotions were omitted from the main layout block (accidentally I
imagine).  I think they used to be there - perhaps a template refactor
stripped them out.

This commit reinstates them so pages that use the default layout
template (like flatpages) can have promotions added to them.
master
David Winterbottom 12 years ago
parent
commit
560c24dffa
2 changed files with 12 additions and 3 deletions
  1. 3
    3
      oscar/templates/oscar/flatpages/default.html
  2. 9
    0
      oscar/templates/oscar/layout.html

+ 3
- 3
oscar/templates/oscar/flatpages/default.html View File

@@ -1,13 +1,13 @@
1 1
 {% extends "layout.html" %}
2 2
 
3 3
 {% block title %}
4
-{{ flatpage.title}} | {{ block.super }}
4
+    {{ flatpage.title}} | {{ block.super }}
5 5
 {% endblock %}
6 6
 
7 7
 {% block headertext %}
8
-{{ flatpage.title }}
8
+    {{ flatpage.title }}
9 9
 {% endblock %}
10 10
 
11 11
 {% block content %}
12
-<article>{{ flatpage.content|linebreaks }}</article>
12
+    <article>{{ flatpage.content|linebreaks }}</article>
13 13
 {% endblock %}

+ 9
- 0
oscar/templates/oscar/layout.html View File

@@ -1,5 +1,6 @@
1 1
 {% extends "base.html" %}
2 2
 {% load compress %}
3
+{% load promotion_tags %}
3 4
 
4 5
 {% block layout %}
5 6
     {# Top-horizontal bar with account, notifictions, dashboard links #}
@@ -33,6 +34,14 @@
33 34
             {% block subnavigation %}{% endblock %}
34 35
             <div class="content">
35 36
                 {% block subheader %}{% endblock subheader %}
37
+
38
+                {# Render promotions #}
39
+                <div id="promotions">
40
+                    {% for promotion in promotions_page %}
41
+                        {% render_promotion promotion %}
42
+                    {% endfor %}
43
+                </div>
44
+
36 45
                 {# Div exists for AJAX updates to entire content section #}
37 46
                 <div id="content_inner">{% block content %}{% endblock %}</div>
38 47
             </div>

Loading…
Cancel
Save