Home
Add a theme to the configuration file
After defining a custom theme, you need to add it to the Communities configuration file, communities-config.xml.
To edit configuration files, use the IBM WebSphere Application Server wsadmin client. See Start the wsadmin client for details.
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 if you want to make your new theme the default community theme, you need to add it to the beginning of the list. This placement means that the theme is used whenever another theme has not been explicitly set.To add a theme to the Communities configuration file...
- Use the wsadmin client to access and check out the Communities configuration files.
- Access the Communities configuration files:
- Stand-alone deployment:
execfile("communitiesAdmin.py")
- Network deployment:
execfile("WAS_HOME/communities/Dmgr01/config/bin_lc_admin/communitiesAdmin.py")
If you are asked to select a server, you can select any server.
- Check out the Communities configuration files...
CommunitiesConfigService.checkOutConfig("<working_directory>", "cell_name")where:
- <working_directory> is the temporary working directory to which the configuration XML and XSD files are copied. The files are kept in this working while you make changes to them.
- cell_name is the name of the WebSphere Application Server cell hosting the Lotus Connections feature. This argument is required even in stand-alone deployments. If you do not know the cell name, do one of the following to determine it:
- Stand-alone deployment: Look at the name after the following in the file system:
WAS_HOME\profiles\profile_name\config\cells\
- Network deployment: Type the following command while in the wsadmin command processor:
print AdminControl.getCell()
For example:
CommunitiesConfigService.checkOutConfig("/opt/my_temp_dir", "CommServerNode01Cell")
- Open communities-config.xml in a text editor.
- 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>CorporateTheme</comm:themeUuid> <comm:displayNameKey>label.theme.name.corporate</comm:displayNameKey> <comm:isScriptKey>false</comm:isScriptKey> <comm:cssUrl>/nav/common/styles/corporateTheme/corporateTheme.css</comm:cssUrl> <comm:cssRtlUrl>/nav/common/styles/corporateTheme/corporateThemeRTL.css</comm:cssRtlUrl> <comm:thumbnailUrl>/images/CorporateTheme.jpg</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.
- <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 that is displayed in the Theme Palette.
- Save the communities-config.xml file.
- After making changes, check the configuration files back in, and do so during the same wsadmin session in which you checked them out for your configuration changes to take effect. You must also stop and restart the Communities server. See Applying property changes for information about how to save and apply your changes.
Add a custom theme to Communities
Related tasks