I've created my first theme under Bludit 3.1.0 and I'm struggling a bit with including a custom php file.
The issue:
I have a one-page template which has an own section showing the latest three blog posts.
Section code:
Code: Select all
<!-- List Blog entries -->
<?php foreach ($content as $page): ?>
<a href="<?php echo $page->permalink(); ?>" class="col-lg-4 news-box">
<?php if ($page->coverImage()): ?>
<div class="image">
<img src="<?php echo $page->coverImage(); ?>" alt="">
</div>
<?php endif ?>
<?php if (!$page->isStatic() && !$url->notFound()): ?>
<!-- Creator information -->
<span class="news-info"><?php echo $page->user('nickname'); ?>, <?php echo $page->date(); ?></span>
<?php endif ?>
<!-- Title -->
<h2 class="title"><?php echo $page->title(); ?></h2>
</a>
<?php endforeach ?>
Below the three latest posts I would like to add a "Show more" button, which is linked to a separate "archive.php" file that is listing all blog posts.
But how can I assign an own permalink to the archive.php and how can it be included by the "page.php" when clicking on the "Read more" button as shown on the main page?