1
Fork 0

Add basic section list page

This commit is contained in:
Jake Howard 2018-07-26 09:22:07 +01:00
parent b824e348f3
commit 739c870a69
Signed by: jake
GPG Key ID: 57AFB45680EDD477
2 changed files with 33 additions and 0 deletions

View File

@ -29,5 +29,8 @@ class Entity(MetadataPageMixin, Page):
def get_meta_description(self):
return self.search_description
def get_short_body(self):
return "Short body"
class Meta:
abstract = True

View File

@ -0,0 +1,30 @@
{% extends "base.html" %}
{% load static %}
{% block content %}
<div id="main">
<div class="container">
{% include "common/content.html" %}
<hr />
{% for child in page.get_children.specific %}
<div class="media list-page-item mb-3">
<div class="d-none d-md-block align-self-center img-wrapper mr-3">
<a href="{{ child.url }}">
<div class="image" data-image=''></div>
</a>
</div>
<div class="media-body">
<a href="{{ child.url }}">
<h5 class="my-0">{{ child.title }}</h5>
</a>
<small>details</small>
<p>{{ child.get_short_body }}</p>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}