# Structure block type

**URL:** <https://forum.getkirby.com/t/structure-block-type/21585>\
**Category:** Questions\
**Tags:** v3\
**Created:** [March 12, 2021, 2:39pm UTC](https://forum.getkirby.com/t/structure-block-type/21585 "2021-03-12T14:39:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tillcremer](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@tillcremer](https://forum.getkirby.com/u/tillcremer)\
**Post date:** [March 12, 2021, 2:39pm UTC](https://forum.getkirby.com/t/structure-block-type/21585/1 "2021-03-12T14:39:46Z")

</div>

Hello,

I want to create a structure block type.

My block blueprint so far:

```
structure:
  name: Structure
  type: structure
  columns:
    record:
      type: text
    period:
      type: text
  fields:
    record:
      type: text
    period:
      type: text

```

My page blueprint:

```
fields:
  blocks:
    type: blocks
    fieldsets:
      - structure

```

When editing, I get the message:

> Missing field setup

What’s wrong?

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [March 12, 2021, 2:44pm UTC](https://forum.getkirby.com/t/structure-block-type/21585/2 "2021-03-12T14:44:41Z")

</div>

The blueprint structure must be the same as in the original ones:

```auto
name: Structure
icon: whatever # optional
columns:
  record:
    type: text
  period:
    type: text
fields:
  record:
    type: text
  period:
    type: text

```

---

<div class="post-metadata">

**Author:** ![tillcremer](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@tillcremer](https://forum.getkirby.com/u/tillcremer)\
**Post date:** [March 12, 2021, 3:22pm UTC](https://forum.getkirby.com/t/structure-block-type/21585/5 "2021-03-12T15:22:32Z")

</div>

Thank you.

The columns don‘t show up. If I add `preview: text`, it shows only the field named text. Is there a way to show all filled block content in the panel—fields _text_ and _period_?

```
name: Structure
preview: text
fields:
  text:
    type: text
  period:
    type: text
```

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [March 12, 2021, 3:32pm UTC](https://forum.getkirby.com/t/structure-block-type/21585/6 "2021-03-12T15:32:08Z")

</div>

You can create preview for your custom blocks as described here:

- Basics: [Blocks | Kirby](https://getkirby.com/docs/reference/plugins/extensions/blocks)
- Step-by-step: [Creating a custom block type from scratch | Kirby](https://getkirby.com/docs/cookbook/panel/custom-block-type)
- Without build process: [To bundle or not to bundle: differences of creating plugins with or without a build process | Kirby](https://getkirby.com/docs/cookbook/panel/to-bundle-or-not-to-bundle)

---

<div class="post-metadata">

**Author:** ![S1SYPHOS](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/s1syphos/32/3671_2.png) [@S1SYPHOS](https://forum.getkirby.com/u/S1SYPHOS)\
**Post date:** [March 18, 2021, 9:28am UTC](https://forum.getkirby.com/t/structure-block-type/21585/7 "2021-03-18T09:28:07Z")

</div>

Nonetheless I’m startled there isn’t such a thing already …

---

<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:** [March 18, 2021, 6:41pm UTC](https://forum.getkirby.com/t/structure-block-type/21585/8 "2021-03-18T18:41:51Z")

</div>

There is an undocumented table field that needs to have a structure field setup (it doesn’t have inline editing, though). I wonder how difficult it would be to turn this into a inline editing preview (but the problem will be the types of fields you use inside your structure).

Example setup:

```auto
        fields:
          blocks:
            type: blocks
            fieldsets:
              table:
                extends: blocks/table
                fields:
                  rows:
                    type: structure
                    columns:
                      title:
                          width: 1/4
                      description:
                          width: 1/2
                      price:
                          width: 1/4
                          align: right
                          after: "USD"
                    fields:
                      title:
                          type: text
                      description:
                          type: textarea
                      price:
                          type: number

```
