Remove gallery and exhibitions controllers

This commit is contained in:
Paul Nicoué 2022-11-22 12:49:43 +01:00
parent c98a997407
commit 7c368957bc
3 changed files with 0 additions and 42 deletions

View file

@ -1,26 +0,0 @@
<?php
return function ($site, $page) {
// Get home page object
$homePage = $site->homePage();
// Get exhibitions field content (stored as yaml) and parse it to return an array
$exhibitions = $page->exhibitions()->yaml();
// Add url based title to each exhibition
foreach ($exhibitions as &$exhibition) {
$exhibition['title'] = str_replace(['http://', 'https://', 'www.'], '', $exhibition['url']);
}
// Get contact fields content
$email = $page->email();
$instagram = $page->instagram();
return [
'homePage' => $homePage,
'exhibitions' => $exhibitions,
'email' => $email,
'instagram' => $instagram
];
};

View file

@ -1,15 +0,0 @@
<?php
return function ($pages, $page) {
// Get exhibition page object
$exhibitionsPage = $pages->template('exhibitions')->first();
// Get image files section content
$images = $page->files()->template("full_screen_image")->sortBy('sort');
return [
'exhibitionsPage' => $exhibitionsPage,
'images' => $images
];
};

View file

@ -15,7 +15,6 @@ return function ($page) {
$instagram = $page->instagram();
// Get image files section content
// $images = $page->files()->template("full_screen_image")->sortBy('sort');
$images = $page->files()->template("full_screen_image")->shuffle();
return [