Nested self-extended Structure

I was trying out to create an (infinite) nestable structure by using the ‘extend’ mechanism. But it seems like Kirby isn’t able to parse that? (it throws an OutOfMemory exception).

So is there a way to achieve something simular like this?
(For clarity sake, I added an example blueprint below. It does not work!).

# fields/myNestingStruct.php
label: Nesting Structure
type: structure
columns:
  name:
    width: 1/1
fields:
  name:
    type: text
    label: Name
  children:
    extends: fields/myNestingStruct

Hm, I tested it without running into a memory issue but it seems logical that you can easily run into one.

From a usability point of view this sounds like a bad idea and I somehow don’t see a use case for an infinitely nested structure.

How did you test it? Because I tried several approuches, without success. (is there an internal depth limit, or is there a version discrepancy?).

I use version 3.4.4


Regarding its usecase:

The usecase would be a tree-like datastructure where both the amount of branches as well as branch depth are not pre-defined.

Kirby already uses this kind of datastructure, which is the pages itself. One can theoratically build an infinite amount of sibling and an infinite amount of child pages.

I use it to build a hierarchical tag system for example (which could be used in a webshop with a large/diverse assortiment for example).

3.4.4

# fields/structure.yml
label: Nesting Structure
type: structure
fields:
  name:
    type: text
    label: Name
  children:
    extends: fields/structure

In BP:

fields:
  struccy:
    extends: fields/structure

It works, but I think this is too confusing for users.

It would be better if there was a way to display this as a tree-like structure (like a directory tree on the pc). I have not found any plugins for it yet, and I don’t have the time currently to spend on making one unfortunately.

But if someone knows about a plugin/extension providing a tree-like view, feel free to give the hint :smiley: