Duplicate a page in the panel in Kirby3


#1

Is it possible to duplicate a page in the panel? I guess i need a custom field with a button to achieve it. Is $page->hardcopy() the way to go?


#2

That would be better off in a custom section, not a field, as it is not supposed to store anything in the page.

And no, not hardcopy (that creates a clone), you have to create a page ($page->create()).


#3

Can i found some documentation about that, with some lines of code to get started please?


#4

https://getkirby.com/docs/reference/plugins/extensions/sections


#5

@texnixe, i tested the code in your link (plugins/extensions/sections : modified field) but i get an error in the front. Any idea what could be wrong?
I tested the code for the extensions of a field (plugins/extensions/field : hello field) and this works.

The field type **"modified"** does not exist

thanks!