+

Search Tips   |   Advanced Search

Theme development

The steps for developing themes for a production portal, includes the development of the theme components, their packaging, and their deployment to systems. The package is either created as the result of a build process that takes the code from a version control system and creates the correct artifacts or the artifacts are created by developers. Multiple artifacts create a release and the team that operates the integration and production servers receive and deploy them.

The components of a portal theme include:


Develop Theme Components

There are several ways to develop a custom theme.


Developing within an IDE

With an integrated development environment, we can set up a project first, usually using the form that we selected for packaging afterward, and add the artifacts like HTML, CSS, and JavaScript files. Next, you export the project and deploy it to the server, either as a compressed file in the file store or an EAR file. Finally, you register the theme with a custom developed theme.xml file.


WebDAV entry point to the file store

Copy a theme to start with the existing content from one of the ready-to-use HCL WebSphere Portal themes or create a folder to start. Add your custom HTML, CSS, and JavaScript files and export these files to create the theme component package. For more information about exporting files, see Export content from the file store.

Enable Some HTTP OPTIONS for WebDAV clients


Export theme theme EAR file then redeploy

  1. Go to Enterprise Applications, select check box for the theme application, then click Export to export the EAR file.

    To export theme from command-line:

      cd /IBM/WebSphere/wp_profile\bin
      wsadmin.bat -user wpsadmin -password foo123 -c "$AdminApp export MyCoThemeEAR /temp/MyCoThemeEAR.ear"
      cd c:\temp

  2. Expand theme...

      C:\IBM\WebSphere\wp_profile\bin\EARExpander.bat -ear MyCoThemeEAR.ear -operationDir /temp/MyCoThemeEAR -operation expand -expansionFlags all

  3. Make changes to theme

  4. Repackage theme

      cd C:\temp
      C:\IBM\WebSphere\wp_profile\bin\EARExpander.bat -ear /temp/MyCoThemeEAR.ear -operationDir /temp/MyCoThemeEAR -operation collapse

  5. Deploy and register the theme

  6. Stop Portal

  7. Clear contents of...

    • WP_PROFILE\temp
    • WP_PROFILE\wstemp
    • WP_PROFILE\tranlog


Download from WebDAV

Use your browser to download http://localhost:10039/wps/mycontenthandler/dav/fs-type1/?mime-type=application/zip

Extract, modify, re-archive, then deploy


Packaging theme Components

The packaging of a custom developed theme depends on how it was developed and what the preferred approach for static files is. For example, we can combine all static files for all themes and all external files that are shared between themes into one installable artifact or split the files into multiple artifacts. Because the method that we choose has different implications for the development team and the team operating the portal, include both groups when deciding how to package the components. All packages must contain an XML Access script to deploy the theme and a list of runtime configurations that need to be applied to the server.The following description shows the options available when all files are packaged together. If the files are separated, the number of files changes but the options are identical.

We can also package the artifacts that you created in a Portal Application Archive (PAA) file for the Solution Installer. The Solution Installer automatically performs the steps to deploy the artifacts.


Deploy theme components

How the theme components were packaged determines the method used to deploy themes. All options require an XMLAccess script and runtime configuration options or a PAA file.


See also

References: