Panel preview template unable to display multiple fields

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.

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 Creating a custom block type from scratch | Kirby CMS

Multiple elements always need to be inside a wrapper.

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

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

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