-@register.filter
-@stringfilter
-def removewholetags(value, tags):
- """Removes a space separated list of [X]HTML tags from the output.
+@register.inclusion_tag('catalogue/menu.html')
+def catalogue_menu():
+ tags = Tag.objects.filter(
+ category__in=('author', 'epoch', 'genre', 'kind', 'theme')
+ ).exclude(book_count=0)
+ return split_tags(tags)
+