Add ability to create multiple content types

This commit is contained in:
panr
2019-11-11 13:15:54 +01:00
parent a81cf2dc29
commit 24442c3f4c
8 changed files with 25 additions and 15 deletions
+1 -8
View File
@@ -1,13 +1,6 @@
{{ define "main" }}
<div class="posts">
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" (or .Params.type "posts")) }}
{{ range $paginator.Pages }}
<div class="post on-list">