+

Search Tips   |   Advanced Search

Add a theme to the Communities configuration file

After defining a custom theme, add it to the Communities configuration file, communities-config.xml.

The list of themes displayed in the theme palette in Communities comes from list of themes defined in the Communities configuration file, communities-config.xml. When you define a new theme, add a corresponding theme entry to the configuration file for it to display in the user interface. The placement of the theme in the configuration file list matches its placement in the Communities theme palette. Typically, you might add new themes to the end of the list, but to make the new theme the default community theme, add it to the beginning of the list. This placement means the theme is used whenever another theme has not been explicitly set.

To add a theme to the Communities configuration file.

  1. Check out the Communities configuration files:

    To get cell: print AdminControl.getCell()

  2. Edit communities-config.xml

  3. Add a new <comm:theme> element to include the properties for the new theme in the list of themes that are already defined in the file:

    For example:

    <comm:theme>
       <comm:themeUuid>corporate</comm:themeUuid>
       <comm:displayNameKey>label.theme.name.corporate</comm:displayNameKey>
       <comm:isScriptKey>false</comm:isScriptKey>
       <comm:cssUrl>/themes/corporateTheme/corporateTheme.css</comm:cssUrl>
       <comm:cssRtlUrl>/themes/corporateTheme/corporateThemeRTL.css</comm:cssRtlUrl>
       <comm:thumbnailUrl>/images/corporate.png</comm:thumbnailUrl>
    </comm:theme>

    where:

    • <comm:themeUuid> is the unique identifier of the theme that is stored in the database when the theme is selected. It should not contain spaces or special characters. It must be 36 characters or less.

    • <comm:displayNameKey> is the resource key for the display name. For information about how to create property strings for the displayNameKey, see Specify the name of a custom theme.

    • <comm:isScriptKey> is set to true when the display name is found in a JavaScript resource file.

    • <comm:cssUrl> is the location of the theme stylesheet.

    • <comm:cssRtlUrl> is the location of the theme stylesheet for right-to-left languages, such as Arabic and Hebrew.

    • <comm:thumbnailUrl> is the location of the thumbnail image displayed in the Theme Palette. The image must be included in...

      /customization/communities/images/

    Ensure the value specified for themeUuid is in lowercase. Also uuid and cssUrl are dependent on each other.

  4. Save communities-config.xml.

  5. After making changes, check the configuration files back in, and we must do so during the same wsadmin session in which you checked them out for the configuration changes to take effect. You must also stop and restart the Communities server. See Applying property changes in Communities for information about how to save and apply the changes.


What to do next

  1. Test the changes by refreshing the web browser.

  2. When we are ready to make the custom theme available to others, refer to steps 6-8 of Customize the user interface for information about how to publish the changes and make them permanent.


Parent topic:
Add a custom theme to Communities


Related:

Customize the user interface

Define a community theme

Specify the name of a custom theme

Remove community themes

Apply property changes in Communities