# Structure field with another structure field inside?

**URL:** https://forum.getkirby.com/t/structure-field-with-another-structure-field-inside/2216
**Category:** Questions
**Tags:** v2
**Created:** [October 12, 2015, 5:36pm UTC](https://forum.getkirby.com/t/structure-field-with-another-structure-field-inside/2216 "2015-10-12T17:36:26Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![horoman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/horoman/32/16041_2.png) [@horoman](https://forum.getkirby.com/u/horoman)
#### Post date: [October 12, 2015, 5:36pm UTC](https://forum.getkirby.com/t/structure-field-with-another-structure-field-inside/2216/1 "2015-10-12T17:36:26Z")

</div>

```auto
…

sections:
    label: Sections
    type: structure
    fields:
      text:
        label: Text 1
        type: text
      subsections:
        label: Subsections
        type: structure
        fields:
          text:
            label: Text 2
            type: text

…

```

[I’m having an error in](https://github.com/getkirby/panel/blob/f8ecc547435d0cd7429198ac10989394a5eb61ae/app/controllers/views/editor.php#L60): `The field could not be found in …/panel/app/controllers/views/editor.php on Line 60`.

---

<div class="post-metadata">

### Author: ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)
#### Post date: [October 12, 2015, 5:58pm UTC](https://forum.getkirby.com/t/structure-field-with-another-structure-field-inside/2216/2 "2015-10-12T17:58:03Z")

</div>

That’s [not possible](https://github.com/getkirby/panel/issues/510), as structure fields use modals and putting modals on top of modals is a UX disaster. Making nested structure fields possible will require designing a new/better user interface for them as Bastian wrote on GitHub.

---

<div class="post-metadata">

### Author: ![AugustMiller](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/augustmiller/32/160_2.png) [@AugustMiller](https://forum.getkirby.com/u/AugustMiller)
#### Post date: [October 12, 2015, 11:40pm UTC](https://forum.getkirby.com/t/structure-field-with-another-structure-field-inside/2216/3 "2015-10-12T23:40:07Z")

</div>

A popular workaround to this problem is to create a special page type or “blueprint” that restricts the possible child pages’ templates. This way, you can add pseudo-children to the page that in turn contain structure fields.

Imagine a `content` folder structure like this:

```ini
/home/home.txt
/special-page/special.txt
/special-page/subpage-1/subpage-type-one.txt
/special-page/subpage-2/subpage-type-two.txt
/special-page/subpage-3/subpage-type-one.txt
/special-page/subpage-4/subpage-type-three.txt

```

The `special` template/blueprint [dictates which page templates can be used beneath it](http://getkirby.com/docs/panel/blueprints/subpages-settings#templates-for-subpages):

```auto
pages:
  templates:
    - subpage-type-one
    - subpage-type-two
    - subpage-type-three

```

The blueprints for each of the `subpage-type-*` pages would include what you’ve described as a “nested structure field,” but because these are discrete pages, now, they can be added as normal structure fields. You could very well only have a single sub-page type, but the idea here is that you can create a flexible system of nested data structures.

---

<div class="post-metadata">

### Author: ![horoman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/horoman/32/16041_2.png) [@horoman](https://forum.getkirby.com/u/horoman)
#### Post date: [October 13, 2015, 10:13am UTC](https://forum.getkirby.com/t/structure-field-with-another-structure-field-inside/2216/4 "2015-10-13T10:13:21Z")

</div>

Thanks! That’s exactly I’ve done time ago with Kirby 1 😄, but it’s was a little confusing for client…

---

<div class="post-metadata">

### Author: ![horoman](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/horoman/32/16041_2.png) [@horoman](https://forum.getkirby.com/u/horoman)
#### Post date: [October 13, 2015, 10:14am UTC](https://forum.getkirby.com/t/structure-field-with-another-structure-field-inside/2216/5 "2015-10-13T10:14:39Z")

</div>

You’re right, I hope some day it be possible to have something similar to the WordPress ACF plugin…

---

<div class="post-metadata">

### Author: ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)
#### Post date: [February 6, 2025, 5:04pm UTC](https://forum.getkirby.com/t/structure-field-with-another-structure-field-inside/2216/6 "2025-02-06T17:04:24Z")

</div>


