6 posts on homepage, not 4
This commit is contained in:
parent
9bd87050f2
commit
11bcb50f72
1 changed files with 9 additions and 1 deletions
|
@ -62,6 +62,10 @@ class ArticleIndexPage(Page):
|
||||||
context['subcategories'] = subcategories
|
context['subcategories'] = subcategories
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
parent_page_types = [
|
||||||
|
'home.ArticleIndexPage',
|
||||||
|
'home.HomePage'
|
||||||
|
]
|
||||||
subpage_types = [
|
subpage_types = [
|
||||||
'home.ArticlePage',
|
'home.ArticlePage',
|
||||||
'home.ArticleIndexPage',
|
'home.ArticleIndexPage',
|
||||||
|
@ -145,6 +149,10 @@ class ArticlePage(Page):
|
||||||
MultiFieldPanel(Page.promote_panels, "Einstellungen"),
|
MultiFieldPanel(Page.promote_panels, "Einstellungen"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
parent_page_types = [
|
||||||
|
'home.ArticleIndexPage',
|
||||||
|
'home.HomePage'
|
||||||
|
]
|
||||||
subpage_types = []
|
subpage_types = []
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "Artikel"
|
verbose_name = "Artikel"
|
||||||
|
@ -221,7 +229,7 @@ class HomePage(Page):
|
||||||
entries = EntryPage.objects.live().descendant_of(parent[0])
|
entries = EntryPage.objects.live().descendant_of(parent[0])
|
||||||
# Order by most recent date first
|
# Order by most recent date first
|
||||||
entries = entries.order_by('-date')
|
entries = entries.order_by('-date')
|
||||||
return entries[:4]
|
return entries[:6]
|
||||||
|
|
||||||
def get_context(self, request):
|
def get_context(self, request):
|
||||||
# Update template context
|
# Update template context
|
||||||
|
|
Loading…
Reference in a new issue