Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Commit

Permalink
better control over pagetitle in arkestra pages
Browse files Browse the repository at this point in the history
  • Loading branch information
evildmp committed Mar 17, 2013
1 parent 1a5e57d commit cd2c8dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Expand Up @@ -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 %}
Expand Down
8 changes: 7 additions & 1 deletion contacts_and_people/views.py
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit cd2c8dd

Please sign in to comment.