From 51aafecb8faf165b4434135e22ffea2dc7f1926e Mon Sep 17 00:00:00 2001 From: GZod01 Date: Sat, 18 May 2024 19:12:11 +0200 Subject: [PATCH] eeeeeeeeee --- layouts/blog/list.html | 2 +- layouts/partials/articles.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/blog/list.html b/layouts/blog/list.html index ead1989..41b704a 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -64,7 +64,7 @@
- {{partial "articles.html" (dict "Paging" true "context" . "ammount" 9) 5}} + {{partial "articles.html" (dict "Paging" true "context" . "ammount" 9 "pagination" true) 5}}
diff --git a/layouts/partials/articles.html b/layouts/partials/articles.html index 6c90b84..24868af 100644 --- a/layouts/partials/articles.html +++ b/layouts/partials/articles.html @@ -9,10 +9,6 @@ {{ if .ammount }} {{ $ammount = (cast.ToInt .ammount) }} {{ end }} - {{ if (.Get 2) }} - {{ debug.Dump (.Get 2) }} - {{ $ammount = (cast.ToInt (.Get 2) )}} - {{ end }} {{ if (eq (len $allposts) 0) }}
- {{ range $index, $article := ($context.Page.Paginate $allposts (cast.ToInt $ammount)).Pages }} + {{ $pageslist := (first $ammount $allposts )}} + {{ if .pagination }} + {{ $pageslist = ($context.Page.Paginate $allposts (cast.ToInt $ammount)).Pages }} + {{ end }} + {{ range $index, $article := $pageslist }}