Adding static content to your custom theme | HCL Digital Experience
After you create a theme, you can begin to customize it by adding static content.
Procedure
- Export the content from the file store. For more information, see Exporting content from the file store.
- Export the files that are required by your custom theme
to the following folders:
- themes
- skins
- layout-templates
- common-resources
- Save the files to your disk.
-
Add a web module to your existing custom theme.
In the following example, an EAR file name MyEar was created for the existing custom theme. The EAR file contains a web module that is named MyDynamicContent.war that uses the context path /MyDynamicContent. If you created a WAR file instead, you must create an EAR file before you can proceed.
- Add the exported static content to the web module.
-
Create a whitelist and a blacklist.
For security reasons, the WAR data source does not serve content until a special context parameter is set. This context parameter defines which files from your web module HCL Portal is able to serve. You can define a whitelist by using a regular expression that matches the files that you want to make available. Then, in a blacklist, you can remove certain entries from the set of files that are available in the whitelist. A blacklist is helpful if you want to serve a folder but not a certain file within that folder. The expressions are case-sensitive. For example, WEB-INF is different than Web-Inf.The parameters are set in the web.xml file of the web module that contains the static theme content. In the following example, the context parameter is set to serve all files that are not part of the WEB-INF folder:
<web-app> ........ <context-param> <description>A regular expression that defines which of the resources in the war file can be served by the portal war datasource.</description> <param-name>com.ibm.portal.whitelist</param-name> <param-value>.*</param-value> </context-param> <context-param> <description>A regular expression that defines which of the resources in the war file cannot be served by the portal war datasource.</description> <param-name>com.ibm.portal.blacklist</param-name> <param-value>WEB-INF/.*</param-value> </context-param> .... </web-app>