- {{ $totalProjects := (len (.Site.GetPage "section" "projects").Pages) }}
+ {{ $totalProjects := (len .Pages) }}
{{ $numberOfProjectsToShow := .Site.Params.numberOfProjectsToShow | default $totalProjects }}
- {{ range (.Site.GetPage "section" "projects").Pages | first $numberOfProjectsToShow }}
+ {{ range .Pages | first $numberOfProjectsToShow }}
{{ if eq (mod $numberOfProjectsToShow 2) 0 }}
{{ else }}
@@ -43,9 +42,8 @@
{{ end }}
-
- {{ range (.Site.GetPage "section" "projects").Pages | first $numberOfProjectsToShow }} {{ if not .Params.external_link }}
+ {{ range .Pages | first $numberOfProjectsToShow }} {{ if not .Params.external_link }}
@@ -77,6 +75,5 @@
{{ partial "top-icon.html" . }}
-
{{ end }}
diff --git a/layouts/projects/list.html b/layouts/projects/list.html
index 66a5f35..a19650a 100644
--- a/layouts/projects/list.html
+++ b/layouts/projects/list.html
@@ -16,13 +16,13 @@
-
- {{ range .Data.Pages }}
- {{ if eq (mod (len (.Site.GetPage "section" "projects").Pages) 2) 0 }}
+ {{ $numberOfPages := len .Pages}}
+ {{ range .Pages }}
+ {{ if eq (mod $numberOfPages 2) 0 }}
{{ else }}
-
-
-
+ {{ partial "top-icon-with-hr.html" . }}
{{ partial "footer.html" . }}
-
-
-
+
+
+
+