C H A P T E R 2 |
Branding the Device-Based Subscriber Portal |
This chapter describes how to brand the version of the Subscriber Portal component of Sun Java System Content Delivery Server that runs on the mobile device. You can provide customized images for the page headers and footers and change the text attributes and colors to more closely conform to your corporate image.
The following topics are presented:
To make changes to the version of the Subscriber Portal that subscribers access from a PC, see Chapter 1. To tailor the device-based Subscriber Portal for the capabilities of specific devices, see Chapter 19, “Device-Specific User Interface Framework,” in the Sun Java System Content Delivery Server Integration and Configuration Guide.
The images used for the header and footer of each page are in the static/media/device directory in the following locations:
The name of each file describes the width of the image and the location used. For example, the file Header128px.gif is used for the header and the image is 128 pixels wide. To change the image used, replace the image with a file of the same name.
Images are used for the header, footer, and the number for each item in an ordered list. To reduce network traffic, you can eliminate the images by changing the style sheets used to generate the pages for the Subscriber Portal.
Style sheets are located in the $CDS_HOME/deployment/deployment-name/markup-generation/stylesheets directory. To remove the images, follow these steps for each style sheet:
1. Open the style sheet that you want to change.
See Chapter 19, “Device-Specific User Interface Framework,” in the Sun Java System Content Delivery Server Integration and Configuration Guide for more information on style sheets.
2. To eliminate the image for the header, replace the header template with the following code.
3. To eliminate the image for the footer, replace the footer template with the following code.
4. To replace the images used for the number of items in an ordered list with a text number followed by a period, follow these steps:
a. In each style sheet that includes a list template, find the following statement in the list template.
<![CDATA[<img src="<%=Web.getWeb().getDefaultImageURL() + "/device/" + jspHelper.getRowNumber() + ".gif"%>" alt="<%=jspHelper.getRowNumber()%>" />]]> |
b. Replace the statement found in the previous step with the following statement:
<![CDATA[<%jspHelper.getRowNumber()%>.]]>
6. Regenerate the pages of the Subscriber Portal.
See Section 2.5, Generating Pages.
The background colors used on the pages and attributes of the text such as alignment and color can be changed to your desired look and feel. To change colors and text attributes, follow these steps for each style sheet located in the $CDS_HOME/deployment/deployment-name/markup-generation/stylesheets directory:
1. Open the style sheet that contains a style template that you want to change.
See Chapter 19, “Device-Specific User Interface Framework,” in the Sun Java System Content Delivery Server Integration and Configuration Guide for more information on style sheets.
2. Set the colors and text attributes, for example:
4. Regenerate the pages of the Subscriber Portal.
See Section 2.5, Generating Pages.
The text shown on the pages of the Subscriber Portal is read from the $CDS_HOME/deployment/deployment-name/localization/SubscriberPortalLocaleResource.properties file. To change messages or the labels for the fields, edit the strings in this file. The properties used for the device-based Subscriber Portal are prefixed with device, for example, device.login.title.
Messages that are displayed when a subscriber is running an application are read from the $CDS_HOME/deployment/deployment-name/localization/FulfillmentLocaleResource.properties file. To change a message, edit the string in this file.
If you have locale-specific resource files, edit the strings in the files for the locales that you use.
The Subscriber Portal consists of pages created using JavaServer PagesTM (JSPTM) technology. These pages are generated from XML files that describe the pages to be produced and XSL style sheets that describe how the page elements are to be rendered. One set of pages is generated for each style sheet and stored in a subdirectory with the same name as the name of the style sheet.
After you modify the style sheets, you must generate new pages for each device-specific version of the Subscriber Portal. To generate new pages, follow these steps:
cdsi genmarkup -ss all -deployment deployment-name
This command processes all of the XML files in the $CDS_HOME/deployment/deployment-name/markup_generation/page-defs directory against all of the style sheets in the $CDS_HOME/deployment/deployment-name/markup_generation/stylesheets directory and generates a new set of pages for each style sheet. Each set of pages is placed in the $CDS_HOME/deployment/deployment-name/markup_generation/jsps/style-sheet directory, where style-sheet is the name of the style sheet used to generate the pages.
2. Move the directories that contain the generated pages to the Subscriber Portal application directory on each application server where you deployed a Subscriber Portal.
For Sun Java System Application Server, move the directories to $CDS_HOME/deployment/deployment-name/sun/domains/server-domain/applications/j2ee-modules/CDSSubscriberPortal/device.
For WebLogic Server, move the directories to $CDS_HOME/deployment/deployment-name/weblogic/domains/server-domain/applications/subscriber/device.
Copyright © 2008, Sun Microsystems, Inc. All Rights Reserved.