# Panel preview template unable to display multiple fields

**URL:** <https://forum.getkirby.com/t/panel-preview-template-unable-to-display-multiple-fields/27779>\
**Category:** Questions\
**Tags:** v3\
**Created:** [February 6, 2023, 11:22am UTC](https://forum.getkirby.com/t/panel-preview-template-unable-to-display-multiple-fields/27779 "2023-02-06T11:22:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stu32832](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@stu32832](https://forum.getkirby.com/u/stu32832)\
**Post date:** [February 6, 2023, 11:22am UTC](https://forum.getkirby.com/t/panel-preview-template-unable-to-display-multiple-fields/27779/1 "2023-02-06T11:22:18Z")

</div>

I’m creating a custom block, I’ve create two fields one a simple text input for a title and the other for block of text using a textarea which I have pre-populated with content using default, this is because its for a use to put a document together from fragments and edit as they need. At some point I want to be able to build blocks from pieces content (assuming thats possible, but its a later development)

I’m using a layout for my pages, when I add my block to the layout only one of the fields displays.

Here is my index.js, as you can see I’m doing nothing fancy.

```auto
panel.plugin("fragments/doc-blocks", {
    blocks: {
        introduction: {
            template: `<h1>{{ content.title }}</h1>
                        <div>{{ content.body }}</div>`
        }
    }
});

```

Currently only the title field displays. Is the content object a one shot deal? am I only able to get a single property on it? a bit of an odd question I know but then this is odd behaviour, I’ve dumped it using console.log and I can see both fields in its data structure so I’m at a loss as to what i’ve done wrong here.

I should add this is my first time using kirby. I was using this tutorial [https://getkirby.com/docs/cookbook/panel/custom-block-type](https://getkirby.com/docs/cookbook/panel/custom-block-type)

---

<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:** [February 6, 2023, 12:35pm UTC](https://forum.getkirby.com/t/panel-preview-template-unable-to-display-multiple-fields/27779/2 "2023-02-06T12:35:55Z")

</div>

Multiple elements always need to be inside a wrapper.

---

<div class="post-metadata">

**Author:** ![stu32832](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@stu32832](https://forum.getkirby.com/u/stu32832)\
**Post date:** [February 6, 2023, 1:18pm UTC](https://forum.getkirby.com/t/panel-preview-template-unable-to-display-multiple-fields/27779/3 "2023-02-06T13:18:27Z")

</div>

I’m sorry, i’m not sure I know what you mean?

---

<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:** [February 6, 2023, 1:22pm UTC](https://forum.getkirby.com/t/panel-preview-template-unable-to-display-multiple-fields/27779/4 "2023-02-06T13:22:23Z")

</div>

I mean if you have more than one HTML element, you need to wrap them inside an outer element (div or whatever block element).

---

<div class="post-metadata">

**Author:** ![stu32832](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@stu32832](https://forum.getkirby.com/u/stu32832)\
**Post date:** [February 6, 2023, 2:14pm UTC](https://forum.getkirby.com/t/panel-preview-template-unable-to-display-multiple-fields/27779/5 "2023-02-06T14:14:21Z")

</div>

Ahhh, got ya, thankyou, i hadn’t considered that
