From 0d5821d7ed36a127dc6228250d18235f3b33534a Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Tue, 5 Mar 2024 08:06:35 +0100
Subject: [PATCH] limit to root programs

---
 layouts/partials/programs/list.html | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/layouts/partials/programs/list.html b/layouts/partials/programs/list.html
index ddd3d9be..0fccc9da 100644
--- a/layouts/partials/programs/list.html
+++ b/layouts/partials/programs/list.html
@@ -12,8 +12,12 @@
   {{ partial "contents/list.html" . }}
   <div class="container">
     {{ partial "diplomas/diplomas-select.html" . }}
+    {{/* Toutes les formations... */}}
     {{ $programs := where .Site.Pages "Section" "programs" }}
+    {{/* mais pas l'accueil des formations... */}}
     {{ $programs = where $programs "Permalink" "!=" .FirstSection.Permalink }}
+    {{/* et pas non plus les pages enfants (parcours) */}}
+    {{ $programs = where $programs "Params.parent" "eq" nil }}
     {{ partial "programs/programs-list.html" $programs }}
   </div>
 </div>
-- 
GitLab