Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-28834

Blueprint Screens can't be decorated with custom Themes

    XMLWordPrintable

Details

    Description

      (originally from https://answers.atlassian.com/questions/152461/main-vmd-not-used-in-editor-when-crating-page-from-blueprint)

      The issue is that customers can use custom themes with layouts like:

      <layout key="main" name="Main Decorator" class="com.atlassian.confluence.themes.VelocityDecorator"
                  overrides="/decorators/main.vmd">
              <resource type="velocity" name="decorator"
                        location="com/atlassian/confluence/themes/foo/main.vmd"/>
      </layout>
      

      In the Confluence Create Content plugin (which implements Blueprints), to get the main decorator working we need a plugin decorator module:

      <decorator name="Main Decorator" page="decorators/main.vmd" key="main">
          <pattern>/plugins/createcontent/*</pattern>
      </decorator>
      

      These two decorator configurations don't appear to be playing friendly - the vmd override file from the layout is not being used, so everything gets the default theme's decorators/main.vmd file.

      One potential "fix" would be to drop the <decorator> module in favour of a Page decorator (see https://developer.atlassian.com/display/CONFDEV/Using+Standard+Page+Decorators), but this would require changes to all template files. It seems better to apply the correct decorator based on the URL pattern, as we are currently doing.

      The fix would involve ensuring that the Sitemesh decorator selector is calling the ConfluenceSpaceDecoratorMapper (which uses the theme override) after the PluginDecoratorMapper (which uses the decorator module).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dtaylor David Taylor (Inactive)
              Votes:
              11 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: