Skip to content
Permalink
Browse files
Adding hierarchy level so that the classification page template knows…
… which level it is on.
  • Loading branch information
felixfontein committed Dec 25, 2016
1 parent f7c8993 commit b2d218bc17510c48c74497190a49e314829fdc60
Showing with 2 additions and 0 deletions.
  1. +2 −0 nikola/plugins/task/taxonomies.py
@@ -444,6 +444,8 @@ def _generate_classification_page(self, taxonomy, classification, post_list, lan
kw["index_file"] = self.site.config['INDEX_FILE']
context = copy(context)
context["permalink"] = self.site.link(taxonomy.classification_name, classification, lang)
if taxonomy.has_hierarchy:
context["hierarchy_level"] = len(taxonomy.extract_hierarchy(classification))
# Links to previous/next classifications
if taxonomy.insert_classification_navigation_links:
self._add_cross_classification_navigation_links(taxonomy, classification, context, kw, lang, generate_list, generate_rss)

0 comments on commit b2d218b

Please sign in to comment.