diff options
author | Sam Wenham <sam@wenhams.co.uk> | 2019-02-23 15:30:58 +0000 |
---|---|---|
committer | Sam Wenham <sam@wenhams.co.uk> | 2019-02-23 15:30:58 +0000 |
commit | a1f02e575f6c379fd1a66cbfdefe8b9f29800297 (patch) | |
tree | 5f9f1791ea31f765974087ae879f248f3a3c18be /templates/flatpage.html | |
parent | f58b1db9208b5a7509699b2a34f70fb275fb8b65 (diff) | |
download | troggle-a1f02e575f6c379fd1a66cbfdefe8b9f29800297.tar.gz troggle-a1f02e575f6c379fd1a66cbfdefe8b9f29800297.tar.bz2 troggle-a1f02e575f6c379fd1a66cbfdefe8b9f29800297.zip |
Prevent troggle adding the menu if there is one in the file
Add a Docker compose file to bring up a dev troggle easily
Various PEP improvments
Diffstat (limited to 'templates/flatpage.html')
-rw-r--r-- | templates/flatpage.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/templates/flatpage.html b/templates/flatpage.html index 2376159..73be1b2 100644 --- a/templates/flatpage.html +++ b/templates/flatpage.html @@ -3,5 +3,13 @@ {% block bodyattrs %}{% if homepage %} id="homepage"{% endif %}{% endblock %} {% block body %} {{ body|safe }} -{% if homepage %}{% if editable %}<a href="{% url "editflatpage" path %}">Edit</a>{% endif %}{%else %}{% include "menu.html" %}{% endif %} +{% if homepage %} + {% if editable %} + <a href="{% url "editflatpage" path %}">Edit</a> + {% endif %} + {%else %} + {% if not has_menu %} + {% include "menu.html" %} + {% endif %} + {% endif %} {% endblock %} |