From f0f2633919da4479a6455ed03fc6613bc7604b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Nicou=C3=A9?= Date: Tue, 2 Aug 2022 15:49:35 +0200 Subject: [PATCH] Add gallery page --- site/controllers/gallery.php | 15 +++++++++++++++ site/templates/gallery.twig | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 site/controllers/gallery.php diff --git a/site/controllers/gallery.php b/site/controllers/gallery.php new file mode 100644 index 0000000..8107f78 --- /dev/null +++ b/site/controllers/gallery.php @@ -0,0 +1,15 @@ +template('exhibitions')->first(); + + // Get artworks files section content + $artworks = $page->files()->template("artwork")->sortBy('sort'); + + return [ + 'exhibitionsPage' => $exhibitionsPage, + 'artworks' => $artworks + ]; +}; diff --git a/site/templates/gallery.twig b/site/templates/gallery.twig index af83019..d2374db 100644 --- a/site/templates/gallery.twig +++ b/site/templates/gallery.twig @@ -1 +1,21 @@ {% extends "base.twig" %} + +{% block header %} +
+ + + +
+{% endblock %} + +{% block main %} +{% endblock %}