Remove Category title if page_title is set

We don't want to show Category - blah .. when in a particular
category page.
This commit is contained in:
PCoder 2019-05-04 13:14:08 +02:00
parent 24e4edc618
commit d73ac46dc8
1 changed files with 12 additions and 10 deletions

View File

@ -5,16 +5,18 @@
{% block content_blog %}
<section class="blog-list">
{% block blog_title %}
<header>
<h2>
{% if author %}{% trans "Articles by" %} {{ author.get_full_name }}
{% elif archive_date %}{% trans "Archive" %} &ndash; {% if month %}{{ archive_date|date:'F' }} {% endif %}{{ year }}
{% elif tagged_entries %}{% trans "Tag" %} &ndash; {{ tagged_entries|capfirst }}
{% elif category %}{% trans "Category" %} &ndash; {{ category }}{% endif %}
</h2>
</header>
{% endblock %}
{% if request.GET.page_title is None %}
{% block blog_title %}
<header>
<h2>
{% if author %}{% trans "Articles by" %} {{ author.get_full_name }}
{% elif archive_date %}{% trans "Archive" %} &ndash; {% if month %}{{ archive_date|date:'F' }} {% endif %}{{ year }}
{% elif tagged_entries %}{% trans "Tag" %} &ndash; {{ tagged_entries|capfirst }}
{% elif category %}{% trans "Category" %} &ndash; {{ category }}{% endif %}
</h2>
</header>
{% endblock %}
{% endif %}
{% for post in post_list %}
{% include "djangocms_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
{% empty %}