Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better control over pagetitle in arkestra pages

  • Loading branch information...
commit cd2c8dd1d3ee8e842a8ddcb13070ff822055b4f8 1 parent 1a5e57d
@evildmp authored
View
8 contacts_and_people/templates/contacts_and_people/arkestra_page.html
@@ -19,9 +19,11 @@
{% block skip_and_language %}
{% endblock %}
-{% block pagetitle %}
- <h{{PAGE_TITLE_HEADING_LEVEL}}>{{ pagetitle|typogrify }}</h{{PAGE_TITLE_HEADING_LEVEL}}>
-{% endblock pagetitle %}
+{% if pagetitle %}
+ {% block pagetitle %}
+ <h{{PAGE_TITLE_HEADING_LEVEL}}>{{ pagetitle|typogrify }}</h{{PAGE_TITLE_HEADING_LEVEL}}>
+ {% endblock pagetitle %}
+{% endif %}
{% block main_page_body %}
{% with placeholder_width=200 %}
View
8 contacts_and_people/views.py
@@ -29,6 +29,12 @@ def contacts_and_people(request, slug=getattr(Entity.objects.base_entity(), "slu
}
people, initials = entity.get_people_and_initials()
+
+ # only show pagetitle if there are people
+ if people:
+ pagetitle = u"Contacts & people"
+ else:
+ pagetitle = u""
# are there Key People to show?
if entity.get_key_people(): # if so we will show a list of people with key roles, then a list of other people
@@ -43,7 +49,7 @@ def contacts_and_people(request, slug=getattr(Entity.objects.base_entity(), "slu
"contacts_and_people/arkestra_page.html", # this is a catch-all template, that then uses includes to bring in extra information
{
"entity":entity,
- "pagetitle": u"Contacts & people",
+ "pagetitle": pagetitle,
"entity.website.template": template,
"main_page_body_file": main_page_body_file,
"email": entity.email,
Please sign in to comment.
Something went wrong with that request. Please try again.