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

The standard Confluence footer is not displayed when developing a new custom theme

    XMLWordPrintable

Details

    Description

      Due to infrastructural changes made in Confluence 4.2, the standard Confluence footer is now only displayed by default when a built-in standard theme in Confluence is active.

      This causes confusion for plugin and theme developers - it is not obvious why the footer disappears when a custom theme is installed. Additionally, there is no easy way to turn the default footer back on for a custom theme - the theme must either override the main decorator (a brittle extension point) or duplicate the footer web panel in the plugin.

      The default behaviour for a custom theme module should be to display the default footer.

      Workaround

      Until this bug is fixed, the easiest way to display the standard footer in your custom theme is to duplicate the footer's "Web Panel" module in your theme plugin. In order to do this, you just need to add the following snippet to your atlassian-plugin.xml file. Make sure to customise the "condition" element to suit your needs.

      <web-panel key="confluence-footer-workaround" name="Confluence Footer Workaround" location="atl.footer">
          <description>Displays the Confluence standalone footer when the custom theme is enabled</description>
          
          <!-- We only want to render this web panel when our custom theme is activated. Otherwise, if a built-in theme is activated, the footer will appear twice! -->
          <condition class="com.atlassian.confluence.plugin.descriptor.web.conditions.ActiveThemeCondition">
              <!-- Set the 'value' to be the fully-qualified plugin module key of your theme module. For example, if your plugin key is "com.example.confluence.test-plugin" and the &lt;theme&gt; module has a key of "my-theme", then you should set the value here to be "com.example.confluence.test-plugin:my-theme".-->
              <param name="themes" value="my.confluence.plugin:theme-key"/>
          </condition>
      
          <!-- this is the velocity template built in to Confluence that displays the standard footer -->
          <resource name="view" type="confluence-velocity" location="/decorators/includes/footer.vm">
              <param name="source" value="webConextStatic"/>
          </resource>
      </web-panel>
      

      Attachments

        1. wiki-default-theme.JPG
          wiki-default-theme.JPG
          49 kB
        2. wiki-default-theme.htm
          90 kB
        3. wiki-commerzbank-theme.JPG
          wiki-commerzbank-theme.JPG
          48 kB
        4. wiki-commerzbank-theme.htm
          90 kB
        5. CommerzbankTheme2013.jar
          1 kB
        6. CommerzbankTheme2013.jar
          1 kB
        7. CommerzbankTheme2013.jar
          4 kB

        Issue Links

          Activity

            People

              jclark@atlassian.com Joe Clark
              jclark@atlassian.com Joe Clark
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: