Skip to content

Commit 812af30

Browse files
committed
Adding MG_TAG_PAGE_HEADER
1 parent 4adcb3f commit 812af30

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ Set this to `True`, if you do not want to display the last article in full on th
165165
**MG_FILTER_TAGS** and **MG_LANG_FILTER_TAGS**
166166
Define those variables as list of tag names if you want to enable the tag filtering buttons.
167167

168+
**MG_TAG_PAGE_HEADER**
169+
Optional custom header text on top of every page listing all articles with a given tag.
170+
HTML is allowed and `%(tag)s` will be subsituted by the current tag name.
171+
168172
**EXTRA_ATOM_FEED**
169173
An extra URL providing an Atom feed of updates that you want inserted along the blog Atom feed.
170174

templates/tag.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
{% block content %}
88
<div class="uk-width-medium-4-5">
99

10-
<p class="mg-tag-page-header">Articles avec le tag <b>{{tag}}</b>&nbsp;:</p>
10+
<p class="mg-tag-page-header">
11+
{% set header_text = MG_TAG_PAGE_HEADER or 'Tag: <b>%(tag)s</b> - Articles:' %}
12+
{{ header_text | format(tag=tag) }}
13+
</p>
1114

1215
{% if articles %}
1316
{% for article in (articles_page.object_list if articles_page else articles) %}

0 commit comments

Comments
 (0)