Development and operations overview
The components of a portal theme include:
- Static content
- Markup defined by HTML, CSS and JavaScript files.
theme.html Markup identical for all the pages that this theme is applied to. layout.html Decoration of the content area for pages. skin.html Decoration of the individual portlets on the page.
If the files used by the theme are not part of the theme folder, and therefore not part of the theme structure, then those files are named external. External files are shared by multiple themes.
- Dynamic content
- Generated based on the data model of WebSphere Portal using technologies like JavaServer Pages or Java code.
- Configuration
- Scripts are used to register the theme and skins with WebSphere Portal.
- Runtime Configuration components are server configurations, similar to Resource Environment Provider settingso required for the themes and skins to work correctly.
Develop Theme Components
There are several ways to develop a custom theme.
- Develop within an IDE
- With an integrated dev environment, you setup a project first, usually following the forselected for packaging later, 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.
- You might fill the project initially with the content of one of the ready-to-use themes or start from scratch.
- Develop on the live server
- This method of developing a theme was introduced recently and is driven through the WebDAV entry point to the file store. We can copy a theme to start with the existing content from one of the ready-to-use WebSphere Portal themes or create a folder to start. Add the custom HTML, CSS, and JavaScript files and export these files to create the theme component package. .
Packaging theme Components
All packages must contain...
- XML Access script to deploy the theme
- List of runtime configurations that need to be applied to the server
If you only created static resources, but used dynamic spoto included within WebSphere Portal or custom dynamic spoto that are generally available, the following options exist:
- Create a package containing a compressed file containing the static resources that can be deployed to the file store.
- Create a package containing an EAR file containing a WAR file with the static resources that can be deployed to the application server.
If you created custom dynamic spots, like components based on JSP technologythat are to be packaged with the theme, the following options exist:
- Create a package containing a compressed file containing the static resources that can be deployed to the file store and an EAR file containing a WAR file containing the dynamic resources.
- Create a package containing an EAR file containing one WAR file with the static resources and a second WAR file containing the dynamic resources. This file can be deployed to the application server.
We can also package the artifacts that you created in a Portal Application Archive 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.
- Compressed file without EAR file
- Use the web-dav-deploy-zip-command to deploy the compressed file and use the XMLAccess command to run the script. Use the WAS admin console to add the runtime configuration.
- Compressed file with EAR file
- Use the web-dav-deploy-zip-command to deploy the compressed file. Use the WAS admin console or scripts to deploy the EAR file. Use the XMLAccess command to run the script.
- An EAR file with no compressed file
- Use the WAS admin console or scripts to deploy the EAR file, and use the XMLAccess command to run the script.
- PAA file
- The Solution Installer automatically detects the steps to perform deployment.
Parent: Develop themes for a production portal
Related:
Export content from the filestore
Related:
Use the Solution Installer