Skip to content

Commit

Permalink
Adding hierarchy level so that the classification page template knows…
Browse files Browse the repository at this point in the history
… which level it is on.
  • Loading branch information
felixfontein committed Dec 25, 2016
1 parent f7c8993 commit b2d218b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nikola/plugins/task/taxonomies.py
Expand Up @@ -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)
Expand Down

0 comments on commit b2d218b

Please sign in to comment.