medienbaecker / kirby-modules

Plugin for modular Kirby websites
MIT License
73 stars 7 forks source link

Reuse module options #46

Closed tan3ot closed 2 months ago

tan3ot commented 2 months ago

I try to reuse module options but get an error in the kirby panel. For normal pages this way of reusing options works.

Reuse module options

I don't know if it's really an issue or I'm doing something wrong...

medienbaecker commented 2 months ago

The changeTemplate option (among others) is automatically generated. Is there a reason why you want to define it manually?

tan3ot commented 2 months ago

I just want to reuse this option for I've some default modules and another modules set. When I add/remove module to/from a set this could be done in one place. But it is not really important just copy'n'paste a few times to achieve this... Ideally, only the list items would be outsourced anyway, then you could also use this in "create". But that doesn't work anyway.

medienbaecker commented 2 months ago

I don't have easy access to the file you're extending. So all I can do for now is check if options is a string (in your case options/module instead of an array and stop the automatic changeTemplate population.

Does the latest release work for you?

tan3ot commented 2 months ago

Yes, this works! Thanks a lot :-)