Remove exhibition links
This commit is contained in:
parent
84de819756
commit
aa60c4d52b
5 changed files with 5 additions and 100 deletions
|
@ -2,28 +2,18 @@
|
|||
|
||||
return function ($site) {
|
||||
|
||||
// Get exhibitions field content (stored as yaml) and parse it to return an array
|
||||
$exhibitions = $site->exhibitions()->yaml();
|
||||
|
||||
// Add url based title to each exhibition
|
||||
foreach ($exhibitions as &$exhibition) {
|
||||
$exhibition['title'] = str_replace(['http://', 'https://', 'www.', '.html'], '', $exhibition['url']);
|
||||
$exhibition['title'] = rtrim($exhibition['title'], '/');
|
||||
}
|
||||
// Get image files section content
|
||||
$images = $site->files()->template("full_screen_image")->shuffle();
|
||||
|
||||
// Get contact fields content
|
||||
$email = $site->email();
|
||||
$instagram = $site->instagram();
|
||||
$portfolio = $site->portfolio()->toFile();
|
||||
|
||||
// Get image files section content
|
||||
$images = $site->files()->template("full_screen_image")->shuffle();
|
||||
|
||||
return [
|
||||
'exhibitions' => $exhibitions,
|
||||
'images' => $images,
|
||||
'email' => $email,
|
||||
'instagram' => $instagram,
|
||||
'portfolio' => $portfolio,
|
||||
'images' => $images
|
||||
'portfolio' => $portfolio
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue