Blog and Pages are now database driven, woo!
This commit is contained in:
parent
34fe54c20c
commit
1f1cf3b71b
20 changed files with 137 additions and 24 deletions
|
@ -6,15 +6,17 @@
|
|||
|
||||
<?php foreach ($blog as $blog_item): ?>
|
||||
|
||||
<h3><?= esc($blog_item['title']); ?></h3>
|
||||
<h3><?= esc($blog_item['title']); ?></h3> <tt><?= esc($blog_item['published']); ?></tt>
|
||||
|
||||
<div class="main">
|
||||
<?= esc($blog_item['body']); ?>
|
||||
<?php echo(substr($blog_item['body'], 0, 250)).'...'; ?>
|
||||
</div>
|
||||
<p><a href="/blog/<?= esc($blog_item['slug'], 'url'); ?>">View article</a></p>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?= $pager->simpleLinks() ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<h3>No News</h3>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<main role="main">
|
||||
<div class="container">
|
||||
<h1 class="mt-5"><?= esc($blog['title']); ?></h1>
|
||||
<?= esc($blog['body']); ?>
|
||||
<?= esc($blog['body'], 'raw'); ?>
|
||||
<br />
|
||||
<a href="/blog" class="btn btn-secondary">Back To Blog</a>
|
||||
</div>
|
||||
</main>
|
Reference in a new issue