mmk2410.org/site/templates/quotes.php
Marcel Kapfer b36abcd3bf
All checks were successful
Deploy / deploy (push) Successful in 3s
🏷 Add types
2025-01-30 19:52:03 +01:00

41 lines
995 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* @var Kirby\Cms\Page $page
* @var Kirby\Cms\Pages $quotes
*/
?>
<?php snippet('layout', slots: true) ?>
<?php slot() ?>
<h1><?= $page->title() ?></h1>
<?= $page->text()->kirbytext() ?>
<?php foreach($quotes as $quote): ?>
<article>
<h2><a href="<?= $quote->url() ?>"><?= $quote->title() ?></a></h2>
<p id="date"><?= $quote->date()->toDate('Y-m-d') ?></p>
<p>
<?= $quote->text()->kirbytext() ?>
</p>
</article>
<?php endforeach ?>
<?php if ($quotes->pagination()->hasPages()): ?>
<nav class="pagination">
<?php if ($quotes->pagination()->hasNextPage()): ?>
<a class="page-item next" href="<?= $quotes->pagination()->nextPageURL() ?>">
ältere Einträge
</a>
<?php endif ?>
<?php if ($quotes->pagination()->hasPrevPage()): ?>
<a class="page-item prev" href="<?= $quotes->pagination()->prevPageURL() ?>">
neuere Einträge
</a>
<?php endif ?>
</nav>
<?php endif ?>
<?php endslot() ?>