Location of theme resources
This topic lists the location of theme resources. Theme resources can be either dynamic J2EE resources or static resources, such as HTML, CSS, JavaScript, and image files.
The theme has two types of resoursces:
Dynamic J2EE resourcesDynamic J2EE resources consist of JSPs. Dynamic resources must be located in a WAR file, as they must be compiled and executed on the server.
Static resourcesStatic resources consist of static HTML, CSS, JavaScript, and image files. Static resources can be located either in WebDAV or in a WAR file.
In a default portal installation, the content stored in WebDAV consists of static resources, such the theme, skin, and layout templates, as well as CSS, images, and JavaScript. The dynamic resources, such as JSPs are deployed in a WAR file. They are used by dynamic content spots within the theme and skin templates. To learn more about dynamic content spots, refer to Work with dynamic content spots. Do not edit any of the themes provided with WebSphere Portal, as they are updated by WebSphere Portal fixes and are static. Instead, update and deploy own copy of the theme WAR in WAS.Theme resources reside in the following locations:
When you work with J2EE theme resources, be aware of the following:
- Theme J2EE resources are deployed at installation to the directory $PORTAL_HOME/theme/wp.mashup.cc.theme/installedApps/wp.mashup.cc.theme.ear/PageBuilder2.war/.
- In the past themes were also deployed to $PORTAL_HOME/installer/wp.ear/installableApps/wps.ear/wps.war/. Deploying customer themes to this location is no longer supported.
- Note that $PORTAL_HOME is a read only directory. Do not make any changes to these files, as they can be updated by service updates. Instead, if you want to customize a theme shipped with Portal, deploy own copy of the theme WAR in WAS. For instructions about deploying themes see Deploy a theme.
- When you deploy theme in its own WAR file, the resources are deployed to the portal profile directory WP_PROFILE/installedApps/node/your-ear-name.ear/your-war-name.war/ .
Static resourcesIn earlier portal versions themes deployed their static resources with their WAR file. With the page builder theme in portal v7.and later versions, static resources are deployed to WebDAV. You can access all WebDAV file store entry points listed below through the root URL http://hostname:port/wps/mycontenthandler/dav/entrypoint/ .
Administration entry points:/themelist/
This is the administrative entry point for managing themes.
/skinlist/This is the administrative entry point for managing skins.
For more details about these entry points, see Use WebDAV to manage themes and skins.
File store entry points:/fs-type1/themes/
You can access all WebDAV entry points listed above through the root WebDAV entry point URL. This URL is http://hostname:port/wps/mycontenthandler/dav/entrypoint/. For more details refer to the topics about Working with static themes.This is the entry point for creating, updating, or deleting static theme HTML, CSS, JavaScript, and image resources.
/fs-type1/skins/This is the entry point for creating, updating, or deleting static skin HTML, JavaScript, and image resources.
/fs-type1/layout-templates/This is the entry point for creating, updating, or deleting static layout templates.
/fs-type1/common-resources/This is the entry point for common static resources that are shared by multiple themes.
Dojo and other JavaScript resourcesDojo is deployed to the directory $PORTAL_HOME/theme/wp.theme.dojo/installedApps/dojo.ear/dojo.war/. Multiple versions of dojo are provided here to support migrated themes that were implemented for a particular version of dojo. Dojo V 1.3.2 is provided in the root directory of dojo.war. Dojo V 1.4.3 and future versions are provided in a subdirectory named by the version, for example /v1.4.3/.
SourceThe Dojo 1.4.3 source including all custom Page builder JavaScript and widgets is included in a compressed .zip file. The location of this file is: $PORTAL_HOME/theme/wp.theme.dojo/installedApps/dojo.ear/dojo.war/source.zip . This zip file includes the Dojo profile with which the theme JavaScript layers are built. It is named portal_dojo_143.profile.js . Use this source and Dojo profile to create new custom layers. If you add a significant amount of custom JavaScript to the theme, create a new JavaScript layer before going into production. For more information about the Dojo build process see the web link to the Dojo Build System below.
JavaScript LayersThe theme utilizes two minmized and compressed JavaScript layers: theme.js and theme.edit.js . Both are located at $PORTAL_HOME/theme/wp.theme.dojo/installedApps/dojo.ear/dojo.war/v1.4.3/com/ibm/themes/PageBuilder2 .
theme.jsThis layer is included when the page is initially rendered. It includes all modules and widgets required for view mode.
theme.edit..jsThis layer is included when a page enters Edit mode. It includes all modules and widgets required for customizing the page.
The same directory includes uncompressed versions of both files, You can edit these files during development or use them for debugging purposes. To use these uncompressed files:
- Access the WAS administrative console.
- Select Resources -> Resource Environment -> Resource Environment Providers.
- Locate the WP CommonComponentConfigService.
- Select Custom Properties.
- Select the property cc.isDebug. Note that this property is on the second page of the properties list.
- Change the value of the property cc.isDebug to true.
- Restart the portal.
Directory structure of theme resourcesInside a WAR file or WebDAV root folder, theme resources are grouped in the directory /themes/. There are additional folders such as, css, images, js, menuDefinitions, and system. This directory can be structured into subdirectories as follows:
/theme/theme_name/nlsExample: /themes/html/PageBuilder/en/. For more information see Aggregation under the section about the Search order for portal resources.
Parent
The Page Builder theme
Aggregation
Use WebDAV to manage themes and skins
Related tasks
Deploy the theme
Deploy the themehttp://docs.dojocampus.org/build/index
Work with dynamic content spots
Dec 6, 2011 12:49:27 PM Updated Dita feature rbrwiki42 theme files location and other wording