Move blog index to be part of base template.
This way, it's not on the bottom of pages. This shouldn't cause trouble, since when date_list isn't defined, nothing is shown by this code.
This commit is contained in:
parent
1c6e685ee4
commit
855584408b
2 changed files with 6 additions and 7 deletions
|
@ -24,6 +24,12 @@
|
|||
(<a href="/feeds/blog/?tag={{ tag.slug }}">rss</a>)</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if date_list %}
|
||||
<h3>Blog Index by Year</h3>
|
||||
<ul>
|
||||
{% for year in date_list reversed %}<li><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<h2><a href="/blog/">See all posts…</a></h2>
|
||||
<!-- <p><a href="/blog/query/">Query...</a></p> -->
|
||||
|
|
|
@ -29,11 +29,4 @@
|
|||
<p class="pagination_list">{% if blog_entries.num_pages > 1 %} {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p>
|
||||
<div class="clear"></div>
|
||||
|
||||
{% if date_list %}
|
||||
<h3>Blog Index by Year</h3>
|
||||
<ul>
|
||||
{% for year in date_list reversed %}<li><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue