nathanborror (owner)

Revisions

gist: 221803 Download_button fork
public
Public Clone URL: git://gist.github.com/221803.git
Embed All Files: show embed
HTML #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# base.html
 
{% block content_wrapper %}
  <div class="content">
    {% block content %}{% endblock %}
  </div>
{% endblock %}
 
 
# object_detail.html
 
{% extends "base.html" %}
 
{% block content_wrapper %}{% endblock %}
 
 
 
Using the capture method:
 
# base.html
{% capture content %}
  {% block content %}{% endblock %}
{% endcapture %}
 
 
{% if content %}
  <div class="content">{{ content }}</div>
{% endif %}
 
 
# object_detail.html
 
No action is needed because base template handles the logic to clear out the content DIV.