Skip to content
Permalink
Browse files
Use archive navigation in all 3 necessary templates
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Dec 23, 2016
1 parent 0e8b8ce commit a9b3f754a492fefaed383a982c46ead6188cf3ea
@@ -1,11 +1,7 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>

<%block name="content">
<article class="listpage">
<header>
<h1>${title|h}</h1>
</header>
<%def name="archive_navigation()">
%if 'archive_page' in pagekind:
%if has_archive_navigation:
<nav class="archivenav">
<ul class="pager">
@@ -21,17 +17,5 @@
</ul>
</nav>
%endif
%if items:
<ul class="postlist">
% for text, link, count in items:
<li><a href="${link}">${text|h}</a>
% if count:
(${count})
% endif
% endfor
</ul>
%else:
<p>${messages("Nothing found.")}</p>
%endif
</article>
</%block>
% endif
</%def>
@@ -1,5 +1,6 @@
## -*- coding: utf-8 -*-
<%inherit file="index.tmpl"/>
<%namespace name="archive_nav" file="archive_navigation_helper.tmpl" import="*"/>

<%block name="extra_head">
${parent.extra_head()}
@@ -13,19 +14,5 @@
</%block>

<%block name="content_header">
%if has_archive_navigation:
<nav class="archivenav">
<ul class="pager">
%if previous_archive:
<li class="previous"><a href="${previous_archive}" rel="prev">${messages("Previous")}</a></li>
%endif
%if up_archive:
<li class="up"><a href="${up_archive}" rel="up">${messages("Up")}</a></li>
%endif
%if next_archive:
<li class="next"><a href="${next_archive}" rel="next">${messages("Next")}</a></li>
%endif
</ul>
</nav>
% endif
${archive_nav.archive_navigation()}
</%block>
@@ -1,11 +1,13 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%namespace name="archive_nav" file="archive_navigation_helper.tmpl" import="*"/>

<%block name="content">
<article class="listpage">
<header>
<h1>${title|h}</h1>
</header>
${archive_nav.archive_navigation()}
%if items:
<ul class="postlist">
% for text, link, count in items:
@@ -1,11 +1,13 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%namespace name="archive_nav" file="archive_navigation_helper.tmpl" import="*"/>

<%block name="content">
<article class="listpage">
<header>
<h1>${title|h}</h1>
</header>
${archive_nav.archive_navigation()}
%if posts:
<ul class="postlist">
% for post in posts:
@@ -45,7 +45,7 @@ class Archive(Taxonomy):
has_hierarchy = True
include_posts_from_subhierarchies = True
include_posts_into_hierarchy_root = True
subcategories_list_template = "archive.tmpl"
subcategories_list_template = "list.tmpl"
generate_atom_feeds_for_post_lists = False
template_for_classification_overview = None
always_disable_rss = True

0 comments on commit a9b3f75

Please sign in to comment.