Add check if page exists
This commit is contained in:
@@ -5,8 +5,9 @@
|
|||||||
<h1><?= $site->title() ?></h1>
|
<h1><?= $site->title() ?></h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
<?php if ($photographyPage = page('photography')): ?>
|
||||||
<ul class="grid">
|
<ul class="grid">
|
||||||
<?php foreach (page('photography')->children()->listed() as $album): ?>
|
<?php foreach ($photographyPage->children()->listed() as $album): ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?= $album->url() ?>">
|
<a href="<?= $album->url() ?>">
|
||||||
<figure>
|
<figure>
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user