Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Verkhoturov <paskal.07@gmail.com>2018-05-10 13:25:04 +0300
committerMatt Stratton <matt.stratton@gmail.com>2018-05-10 13:25:04 +0300
commit165c7bfa9c38290a27d16088633ea879cf4f7ff9 (patch)
treefef0034d3d28c445d959103743397be65b285842 /layouts/partials
parent49567de693c4d25f6ec2b8259650d745572544f6 (diff)
don't fail in case of .Data.Pages type:episode absence (#183)
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/row.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/partials/row.html b/layouts/partials/row.html
index 1aab16e..7d67838 100644
--- a/layouts/partials/row.html
+++ b/layouts/partials/row.html
@@ -109,6 +109,7 @@
<section class="episode-list">
<!-- rest of episodes -->
+{{- if (where .Data.Pages "Type" "episode") -}}
{{- $paginator := .Paginate (after 1 (where .Data.Pages "Type" "episode")) 5 -}}
{{- $list := (where .Data.Pages "Type" "episode") -}}
{{- $len := (len $list) -}}
@@ -255,5 +256,6 @@
</div>
{{- end -}}
</div>
+{{- end -}}
</div>
</div> <!-- end section -->