Skip to content

Commit

Permalink
Correct html titles for flatpages app (#3631)
Browse files Browse the repository at this point in the history
This is part of Task 2 under issue
#3556 aiming to make
sure the titles are clear and correct.

Each app will have a PR to make sure titles are clear and correct for
all pages that have breadcrumbs as described in issue
#3556
  • Loading branch information
ammar257ammar authored Oct 21, 2024
1 parent 31a9186 commit 2f3aea8
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
{% load static %}

{% block title %}
{% if flatpage %}Update{% else %}Create Flatpage{% endif %} - {% if flatpage %}{{ flatpage.title }}{% else %}Flatpages{% endif %} - {{ block.super }}
{{ object|yesno:"Update,Create Flatpage" }} {% if flatpage %} - {{ flatpage.title }} {% endif %} - {{ block.super }}
{% endblock %}

{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item active">{% if flatpage %}<a href="{{ flatpage.url }}">{{ flatpage.title }}</a>{% else %}Flatpages{% endif %}</li>
<li class="breadcrumb-item active">{% if flatpage %}Update{% else %}Create Flatpage{% endif %}</li>
{% if flatpage %}
<li class="breadcrumb-item"><a href="{{ flatpage.url }}">{{ flatpage.title }}</a></li>
{% endif %}
<li class="breadcrumb-item active">{{ object|yesno:"Update,Create Flatpage" }}</li>
</ol>
{% endblock %}

Expand Down

0 comments on commit 2f3aea8

Please sign in to comment.