Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not render page_title if it is empty #655

Open
nlhkabu opened this issue Sep 13, 2018 · 0 comments
Open

Do not render page_title if it is empty #655

nlhkabu opened this issue Sep 13, 2018 · 0 comments

Comments

@nlhkabu
Copy link
Contributor

nlhkabu commented Sep 13, 2018

In site_base.html we have the following code:

<h1>{% block page_title %}{% endblock %}</h1>

Sometimes page_title is empty and another h1 is defined later on the page.

In this case, we do not want to render the <h1> that wraps page_title.

In the short term I have issued a temporary fix, which hides the empty h1 with css.

However, this is not ideal, as the semantics of the page are messed up.

This is a suggested fix I found: https://chase-seibert.github.io/blog/2010/10/01/check-if-a-block-is-defined-in-django.html

There is also this https://github.com/edoburu/django-capture-tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant