Hi everybody,
is there a plugin available to duplicate structure entries? Can’t find a solution in the forum expect of a very old thread.
Cheers
Hi everybody,
is there a plugin available to duplicate structure entries? Can’t find a solution in the forum expect of a very old thread.
Cheers
I’m not aware of such a plugin. Maybe the Swiss army knife called Janitor plugin could be useful for this purpose, @bnomei?
lets assume one add a janitor button to a structure blueprint. the button will appear on every entry form. problem is for the button to know which structure entry to forward to the job that will handle the duplication. one would need to add the data prop to something like “item” (maybe @texnixe know how query would address an item in structure properly).
mystructure:
type: structure
fields:
# other fields
duplicate:
type: janitor
label: Duplicate Item
data: '{{ item }}'
the button is aware of the “model”… so if the model in a structure field is forwared through the query it might work. if currently only knows pages and files but adding structures (if the model support that) might not be too hard. sadly i do not have any time at hand for a week or two. but @Oli1 you could add an issue so i do not forget.
some relevant code…
Looks like a heavy project for me … not sure why, but maybe duplicate structure entries should be a core feature?
@bnomei really awesome plugin!!!
Sure, already done