Sorry, we don't support your browser.  Install a modern browser

More methods for structure fields#161

It is always very easy and uncomplicated to work with pages as there are so many methods available. However, it is often necessary to use Structure fields. Here it is sometimes really very complex to add, remove or update entries.

Some Structure Helper methods would be great such as

$structure->add(); // prepend or append or position
$structure->delete(); // first or last or position
$structure->update();
$structure->changeSorting();

Or similar functions as with the pages. It would be more Kirby like as to work with regular arrays and convert them frequently.

Reference:

https://forum.getkirby.com/t/add-to-structure-in-specific-language/14883
https://forum.getkirby.com/t/update-specific-structure-field/16456/2?u=oli1

3 years ago
2