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

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

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

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

1
 {% extends "base.html" %}
1
 {% extends "base.html" %}
2
 {% load compress %}
2
 {% load compress %}
3
+{% load promotion_tags %}
3
 
4
 
4
 {% block layout %}
5
 {% block layout %}
5
     {# Top-horizontal bar with account, notifictions, dashboard links #}
6
     {# Top-horizontal bar with account, notifictions, dashboard links #}
33
             {% block subnavigation %}{% endblock %}
34
             {% block subnavigation %}{% endblock %}
34
             <div class="content">
35
             <div class="content">
35
                 {% block subheader %}{% endblock subheader %}
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
                 {# Div exists for AJAX updates to entire content section #}
45
                 {# Div exists for AJAX updates to entire content section #}
37
                 <div id="content_inner">{% block content %}{% endblock %}</div>
46
                 <div id="content_inner">{% block content %}{% endblock %}</div>
38
             </div>
47
             </div>

Loading…
Cancel
Save