Retrieving and updating all available palettes on an instance?

Is it possible to use "Script API" or "REST API" to get a list of all available palettes on an instance, as well as add a new palette?

Now, as far as I can see, the only way to add your own palette is to edit the XML file through the Theme Studio in Palettes section.

Parents
  • From a theme's perspective, a palette is no different than its defined configuration like a CSS file, in that it's just script the theme consumes. A palette is a pre-defined grouping of configuration options of any types for the user to select through theme options. So, you can customize the Social theme's out-of-the-box palettes or add entirely new palette types to the theme to support selecting other types of configuration groupings.

    However, like other components of a theme's definition like its script files, there isn't currently a public API for editing these - just for consuming them within the theme itself.

    What are you trying to achieve? There may be a better approach.

  • Thanks a lot again, for the comprehensive guide!

    The palette provides a lot of grouped conveniences for widgets and themes, which I find a powerful mechanism for devs and CM's.

    I considered an option using the inheritance of my own styles (custom <property /> definitions) from the global theme => group theme => blog theme. But for the out of the box widgets, when overriding styles from the theme side, the style encapsulation for palette widgets (widgets that provide palette settings) will be broken. So I'm trying to find an easy way to set the palette preferences.

Reply
  • Thanks a lot again, for the comprehensive guide!

    The palette provides a lot of grouped conveniences for widgets and themes, which I find a powerful mechanism for devs and CM's.

    I considered an option using the inheritance of my own styles (custom <property /> definitions) from the global theme => group theme => blog theme. But for the out of the box widgets, when overriding styles from the theme side, the style encapsulation for palette widgets (widgets that provide palette settings) will be broken. So I'm trying to find an easy way to set the palette preferences.

Children