A new portal skin needs to be added to the portal through the skin service. The web application
which contains the skin will need to be properly configured for the skin service to discover them. This
means that ResourceRequestFilter
and gatein-resources.xml
should be configured properly.
The gatein-resources.xml
file specifies the new portal skin, including its
name and where to locate its CSS stylesheet file and whether to overwrite an existing portal theme with the same name.
<gatein-resources>
<portal-skin>
<skin-name>MySkin</skin-name>
<css-path>/skin/myskin.css</css-path>
<overwrite>false</overwrite>
</portal-skin>
</gatein-resources>
The default portal skin and window styles are defined in
eXoResources.war/WEB-INF/gatein-resources.xml
.
The CSS for the portal skin needs to contain the CSS for all the window decorators and the portlet specification CSS classes.
When selecting a skin, it is possible to preview it. The current skin needs to know about the skin icons for all the available skins; otherwise, it will not be able to show the previews. When creating a new portal, it is recommended to include the preview icons of the other skins and to update the other skins with your new portal skin preview.
The portal skin preview icon is specified through the CSS of the portal skin. To display the preview for the current portal skin, you must specify a specific CSS class and set the icon as the background.
For the portal named MySkin, the CSS class must be defined as follows:
.UIChangeSkinForm .UIItemSelector .TemplateContainer .MySkinImage
In order for the default skin to know about the skin icon for a new portal skin, the preview screenshot
needs to be placed in:
01eXoResources.war:/skin/DefaultSkin/portal/webui/component/customization/UIChangeSkinForm/background
.
The CSS stylesheet for the default portal needs to have the following updated with the preview icon CSS class. For a skin named
MySkin, you need to update the following:
01eXoResources.war:/skin/DefaultSkin/portal/webui/component/customization/UIChangeSkinForm/Stylesheet.css
.
.UIChangeSkinForm .UIItemSelector .TemplateContainer .MySkinImage {
margin: auto;
width: 329px; height:204px;
background: url('background/MySkin.jpg') no-repeat top;
cursor: pointer ;}