-
- 42 Posts
Hi,
I made some customization to plugins for example TinyMCE, CodeMirror and others which are stored in the default propery set as this seems the only way to customize these plugin-ins.
Now the day comes when these packages need to be upgraded and all my customizatios are lost. I know I can export and re-import those property sets, but the danger is that this is easily forgotten. Is there a better way to preserve customizations between upgrades of installed packages?
The intention is that you do not change the default properties. You should create Property Sets to isolate your custom properties so that upgrades of Extras can adjust the default properties as appropriate. You can then use those Property Sets on your Elements. For Plugins, these are assigned when you register the Plugin with a specific Event.
-
- 712 Posts
Not entirely related, but I'm looking for a way to package Property Sets, with say a Chunk. I'm using PackMan 1.2.0 but it doesn't seem to include the non-Default Property Sets.
Jason, is it consider bad practice to include Property Sets with addons because of the preserving customization issue? Should I rather make setting any convient Package Sets part of the Installation Process and do things like provide import scripts?
jpdevries
-
- 24,544 Posts
The new version of MyComponent will package Property Sets (if it ever gets finished).
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
I don't see anything wrong with packaging Property Sets as examples or standard configuration options, though it might be good to be careful with naming conventions when doing so. It WILL be imperative that users know they are bundled Property Sets, and that creating their own based on these rather than modifying them would be preferred, unless they intend to automatically get the new Property Sets applied to their site when upgrading.
Setting the values of a property set on Install is an interesting idea, but I've never tried such.
-
- 24,544 Posts
It's relatively easy to do in a resolver, as long as the property set and all the objects the settings refer to are installed before the resolver runs.
The new version of MyComponent has a built-in resolver that automatically connects Property Sets to Elements.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html