mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 04:14:41 +00:00
fix: "See More" link in Pages widget not appearing
After the "Offset and Limit" section, `$query` would have length of `$items_count`, which makes `$count` always equal to `$items_count`. The later "if" condition for adding the "see all posts" link will never be met. The fix is to record the length of `$query` into `$count` before any offset and limit. See #963
This commit is contained in:
1 parent
de28ca4241
commit
e2274c6b35
1 file changed
+2
-2
@@ -40,6 +40,8 @@
|
||||
{{ $query = where $query "Date" "<" now }}
|
||||
{{ end }}
|
||||
|
||||
{{ $count := len $query }}
|
||||
|
||||
{{/* Sort */}}
|
||||
{{ $sort_by := "Date" }}
|
||||
{{ $query = sort $query $sort_by $items_sort }}
|
||||
@@ -51,8 +53,6 @@
|
||||
{{ $query = first $items_count $query }}
|
||||
{{ end }}
|
||||
|
||||
{{ $count := len $query }}
|
||||
|
||||
{{/* Localisation */}}
|
||||
{{ $i18n := "" }}
|
||||
{{ if eq $items_type "post" }}
|
||||
|
||||
Reference in new issue
Block a user