# Formatting and layout different in 'page' blog to 'article' blog pages

**URL:** <https://forum.getkirby.com/t/formatting-and-layout-different-in-page-blog-to-article-blog-pages/22848>\
**Category:** Questions\
**Tags:** v3\
**Created:** [July 11, 2021, 3:32pm UTC](https://forum.getkirby.com/t/formatting-and-layout-different-in-page-blog-to-article-blog-pages/22848 "2021-07-11T15:32:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidroberts](https://avatars.discourse-cdn.com/v4/letter/d/3da27b/32.png) [@davidroberts](https://forum.getkirby.com/u/davidroberts)\
**Post date:** [July 11, 2021, 3:32pm UTC](https://forum.getkirby.com/t/formatting-and-layout-different-in-page-blog-to-article-blog-pages/22848/1 "2021-07-11T15:32:51Z")

</div>

The URL links - not showing and the layout are not the same - which is what I want - in the $article section of the blog post as to the $page section of the blog.

So, I am using \<?= $article-\>text()-\>excerpt(275)-\>kirbytext() ?\> on the article intro and \<?= $page-\>text()-\>kirbytext() ?\> on the blog post itself.

How do I fix this so that I get the links and formatting working and looking the same in both the intro blog post and the blog post itself?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 11, 2021, 3:54pm UTC](https://forum.getkirby.com/t/formatting-and-layout-different-in-page-blog-to-article-blog-pages/22848/2 "2021-07-11T15:54:30Z")

</div>

> [@davidroberts](#):
>
> How do I fix this so that I get the links and formatting working and looking the same in both the intro blog post and the blog post itself?

Could you provide more context, please? Since we don’t know your setup (blueprints, templates, styles etc.), it’s impossible to help you…

---

<div class="post-metadata">

**Author:** ![davidroberts](https://avatars.discourse-cdn.com/v4/letter/d/3da27b/32.png) [@davidroberts](https://forum.getkirby.com/u/davidroberts)\
**Post date:** [July 13, 2021, 2:08pm UTC](https://forum.getkirby.com/t/formatting-and-layout-different-in-page-blog-to-article-blog-pages/22848/3 "2021-07-13T14:08:20Z")

</div>

On the ‘blog page,’ you get the first 275 characters in a paragraph without any links (if any) showing and on the ‘blog article’ page the links are showing.

Blog code:

```auto
<?php snippet("meta"); ?>
<?php snippet("header"); ?>

<div class="main-text">
  <div class="header-main">
   <h1 class="blog-head"><a name="top"></a>This &amp; That</h1>
    </div>
    <div class="red-title">BLOG</div>

    <div class="blog-text">
   <section>
   <?php foreach($articles as $article): ?>
   <article>
     <header>
        <h1 class="title-heading"><?= $article->title()->link() ?></h1>
     </header>
     <div class="blog-time">
       <time class="blog-date"><?= $article
         ->date()
         ->toDate("d F Y") ?></time>
     </div>
      <?= $article->text()->excerpt(275)->kirbytext() ?>
</article>
<hr class="solid">  
<?php endforeach; ?> 

```

Blog article code:

```auto
<?php snippet("meta"); ?>
<?php snippet("header"); ?>

  <div class="main-text-blog">
   <main class="blog-text-article">
     <h1 class="title-heading"><?= $page->title()->html() ?></h1> 
        <div class="blog-time"> 
        <time class="blog-date"><?= $page->date()->toDate("d F Y") ?></time>
          </div>
          <div class="blog-text">
    <section>
    <article>
    <h2 class="blog-subheading"><?= $page->headline()->html() ?></h2> 
     <?= $page->text()->kirbytext() ?>
     
  <div class="tag">
   <ul class="tags">
     <?php foreach ($page->tags()->split(',') as $tag): ?>
        <li class="tag-item">
         <a href="<?= $page->parent()->url([
           "params" => [
           "tag" => $tag,
           ],
         ]) ?>"><?= html($tag) ?></a>
       </li>
   <?php endforeach; ?>
    </ul>
  </div>

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 13, 2021, 7:41pm UTC](https://forum.getkirby.com/t/formatting-and-layout-different-in-page-blog-to-article-blog-pages/22848/4 "2021-07-13T19:41:04Z")

</div>

> [@davidroberts](#):
>
> \<?= $article-\>text()-\>excerpt(275)-\>kirbytext() ?\>

If you want to preserve HTML tags, you have to use `false` as second argument:

```auto
echo $page->text()->excerpt(300, false)->kt();

```

Don’t know if that makes sense if links etc. are cut off in the middle.

---

<div class="post-metadata">

**Author:** ![davidroberts](https://avatars.discourse-cdn.com/v4/letter/d/3da27b/32.png) [@davidroberts](https://forum.getkirby.com/u/davidroberts)\
**Post date:** [July 15, 2021, 5:12pm UTC](https://forum.getkirby.com/t/formatting-and-layout-different-in-page-blog-to-article-blog-pages/22848/5 "2021-07-15T17:12:14Z")

</div>

Thanks. That is what I was looking for.
