Platform Explorer / Nuxeo Platform 11.3

Extension point flavors


The flavors extension point allows to define a set of variables that can be referenced inside CSS files, for dynamic replacement depending on context, as well as a logo.


    <flavor name="default">
            <icon name="icon">/icons/favicon.png</icon>
            <icon name="shortcut icon">/icons/favicon.ico</icon>
            <presets category="border" src="themes/palettes/"/>
            <presets category="background" src="themes/palettes/"/>
            <presets category="font" src="themes/palettes/"/>
            <presets category="color" src="themes/palettes/"/>

The presets files are looked up in the jar holding the flavor declaration. CSS files will reference the flavor marker, as well as additionnal hint about the type of preset to use:

        .nx-page input[type="button"] {
          background: none "button (__FLAVOR__ background)";
          border-radius: 2px;
          border: 1px solid;
          border-color: "button (__FLAVOR__ border)";
          color: "link.action (__FLAVOR__ color)";
          cursor: pointer;
          display: inline-block;
          font-size: .95em;
          font-weight: bold;
          line-height: 1.3em;
          margin: 0 .5em .5em 0;
          padding: .4em .9em;
          text-decoration: none;
          white-space: nowrap }

The current flavor can be computed at runtime using negotiator logics, see the negotiators extension point on this service.

The default flavor defined for a given page will be used if the page does not accept this flavor in its configuration.

Attribute "links" is available only since 7.4 and allows to define favicons visible on the page (it was previously defined by the Theme extension point layout configuration).

Contribution Descriptors


No known contributions.