Commits

Luke Plant committed d0b6ba0

Added better title to sermons page using django-easyfilters FilterSet.title attribute

  • Participants
  • Parent commits fd09080

Comments (0)

Files changed (4)

File christchurch/templates/standard.html

 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-  <title>{{ request.current_page.get_title }} :: Christ Church, Bradford</title>
+  <title>{% block title %}{{ request.current_page.get_title }}{% endblock %} :: Christ Church, Bradford</title>
   <meta name="keywords" content="Christ church, Bradford, church, evangelical, reformed, christchurch, Yorkshire, UK, Pollard Park">
   <script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.min.js"></script>
   <link rel="StyleSheet" href="{{ STATIC_URL }}christchurch/css/style.css" type="text/css">

File requirements.txt

 -e hg+https://bitbucket.org/spookylukey/semanticeditor/@3a40b4766f32#egg=semanticeditor
 django-pagination
 mutagen>=1.19
--e hg+https://bitbucket.org/spookylukey/django-easyfilters/@0e6b385ed4ba#egg=django-easyfilters
+django-easyfilters==0.3
 django-inline-ordering==0.1.3
 easy-thumbnails==1.0-alpha-17
 cmsplugin_gallery==0.1.7

File sermons/templates/sermons/index.html

 {% extends "standard.html" %}
 {% load pagination_tags %}
+
+{% block title %}Sermons
+  {% with title=sermonsfilter.title %}
+    {% if title %} - {{ title }}{% endif %}
+  {% endwith %}
+{% endblock %}
+
 {% block content %}
 {{ block.super }}
 

File sermons/views.py

                                 max_depth='month')),
         ]
 
+    title_fields = [
+        'speaker',
+        'series',
+        'bible_book'
+        ]
+
 
 def index(request):
     sermons = Sermon.objects.filter(published=True)