+ class="list_item {{ item.css_class|default_if_none:"" }}{% if not item_big_cover %} flex_row{% endif %}">
{% if item.cover %}
{% if item_big_cover %}
{% image item.cover max-640x480 class="cover big" height="" width="" %}
@@ -23,6 +23,7 @@ Options:
{% image item.cover fill-64x64 class="cover small" %}
{% endif %}
{% endif %}
+
{{ item.title }}
diff --git a/aircox_cms/wagtail_hooks.py b/aircox_cms/wagtail_hooks.py
index 07ef361..48f800e 100755
--- a/aircox_cms/wagtail_hooks.py
+++ b/aircox_cms/wagtail_hooks.py
@@ -222,11 +222,16 @@ class GenericMenu(Menu):
"""
pass
+ @staticmethod
+ def page_of(item):
+ return item.page
+
def page_url(self, item):
- if item.page.count():
+ page = self.page_of(item)
+ if page:
name = 'wagtailadmin_explore' \
if self.explore else 'wagtailadmin_pages:edit'
- return reverse(name, args=[item.page.first().id])
+ return reverse(name, args=[page.id])
parent_page = self.get_parent(item)
if not parent_page:
@@ -311,7 +316,7 @@ class TodayMenu(GenericMenu):
attrs = {}
- qs = PageRevision.objects.filter(page = item.page.first())
+ qs = PageRevision.objects.filter(page = item.page)
if qs.count():
headline = qs.latest('created_at').content_json
headline = json.loads(headline).get('headline')
diff --git a/notes.md b/notes.md
index 9214c43..a2d4420 100755
--- a/notes.md
+++ b/notes.md
@@ -21,6 +21,7 @@ This file is used as a reminder, can be used as crappy documentation too.
- category page
- for timetable, logs, etc. make station optional
- django's message css displayed on pages when element is modified (remove bullet)
+ - articles preview in different format
# conventions