From 81e020d2d95e6f23bfbba747ec2fc9e0a0b6246e Mon Sep 17 00:00:00 2001 From: Will Faught Date: Thu, 2 Mar 2023 20:39:57 -0800 Subject: [PATCH] Skip page if nil --- layouts/partials/paige/resource.html | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/layouts/partials/paige/resource.html b/layouts/partials/paige/resource.html index a3888c9b..6f2e6cf6 100644 --- a/layouts/partials/paige/resource.html +++ b/layouts/partials/paige/resource.html @@ -13,20 +13,24 @@ {{ $result = . }} {{ end }} {{ end }} -{{ else }} +{{ end }} + +{{ if and (not $result) $page }} {{ with $page.Resources.GetMatch $url }} {{ $result = . }} {{ else }} {{ with $page.Resources.Get $url }} {{ $result = . }} - {{ else }} - {{ with resources.GetMatch $url }} - {{ $result = . }} - {{ else }} - {{ with resources.Get $url }} - {{ $result = . }} - {{ end }} - {{ end }} + {{ end }} + {{ end }} +{{ end }} + +{{ if not $result }} + {{ with resources.GetMatch $url }} + {{ $result = . }} + {{ else }} + {{ with resources.Get $url }} + {{ $result = . }} {{ end }} {{ end }} {{ end }}