To add an article intro which you can display and maybe style differently from the rest of the post you have to set up an additional field in your .blogarticle.txt
first.
Title: Some title
----
Text: Some great text
----
Tags: design, photography, architecture, whatever
----
Intro: This is a nice article intro. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
----
Text: [...]
Now we gonna implement the intro in the blog's overview loop (instead of an excerpt) like this:
<?php snippet(‘header’) ?>
<?php snippet(‘menu’) ?>
<main class=“blog” role=“main”>
<h1><?php echo html($page->title()) ?></h1>
<?php echo kirbytext($page->text()) ?>
<?php foreach($page->children()->visible()->flip() as $article): ?>
<article>
<h1><?php echo html($article->title()) ?></h1>
<?php echo kirbytext($article->intro()) ?>
<a href=“<?php echo $article->url() ?>”>Read more…</a>
</article>
<?php endforeach ?>
</main>
<?php snippet(‘footer’) ?>
Your article template would look like this:
<?php snippet(‘header’) ?>
<?php snippet(‘menu’) ?>
<main class=“blogarticle” role=“main”>
<article>
<h1><?php echo html($page->title()) ?></h1>
<?php echo kirbytext($page->intro()) ?>
<?php echo kirbytext($page->text()) ?>
<a href=“<?php echo url(‘blog’) ?>”>Back…</a>
</article>
</main>
<?php snippet(‘footer’) ?>