Commits

Luke Plant committed d0b6ba0

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

Comments (0)

Files changed (4)

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">
 -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

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 }}
 
                                 max_depth='month')),
         ]
 
+    title_fields = [
+        'speaker',
+        'series',
+        'bible_book'
+        ]
+
 
 def index(request):
     sermons = Sermon.objects.filter(published=True)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.