Sun Java System Portal Server 7 Enterprise Sample Guide

Chapter 2 Customizing Your Desktop

The Enterprise Sample uses Cascading Style Sheets (CSS) for the Portal Desktop presentation. The Enterprise Sample CSS files are located in the portal data directory PortalServer-DataDir/portals/portal-ID/web-src/enterprise/css.

Modify the CSS files according to your platform needs and then, redeploy the portal for the change to take affect.

The following sections contain procedures that illustrate some ways you can make changes in the CSS file:

To access the Portal Desktop administration screen, see Accessing the Portal Desktop Administration Screen.

Changing the Logo

ProcedureTo Change the Logo

Steps
  1. Get a suitable image of the logo in the supported format (such as jpeg, gif, png).

  2. Edit the PortalServer-dataDir/portals/portal-ID/desktop/enterprise_sample/ASCTabContainerProvider/body.jsp file.

    Look for the image file name asc-logo-8.png in the following code:


    /enterprise/images/asc-logo-8.png" alt=...

    Replace this file with your new logo file. For example,


    logo_sun_small_sdn.gif - /enterprise/images/logo_sun_small_sdn.gif" alt=...
  3. Adjust the dimensions and coordinates of the logo using the standard HTML tags (height, width).

  4. Place your logo in the PortalServer-dataDir/portals/portal-ID/web-src/enterprise/images directory.

  5. Redeploy the Portal Server to the web container.

    To redeploy, type PortalServer-base/bin/psadmin redeploy --adminuser amAdmin --passwordfile password-filename --portal portal-ID.


    Note –

    The image must first be placed in the portal web application source directory and then the portal web application should be redeployed. Otherwise, the change may be lost if the portal web application is ever redeployed.


  6. Verify that the new logo appears as desired by typing the following URL in your browser.


    http://yourserver:port/portal-ID/dt?desktop.suid=uid=authlessenterprisesample,ou=People,o=EnterpriseSample,dc=org,dc=com

Adding a Background Image

ProcedureTo Add a Background Image

Steps
  1. Go to the Enterprise Sample CSS directory located under the portal data directory, PortalServer-DataDir/portals/portal-ID/web-src/enterprise/css.

  2. Modify the CSS file in the appropriate places

    For example:


    .channelBackground {
    background-image: url(../images/banner.jpg);
    background-repeat: no-repeat;
    background-position-x: left;
    background-position-y: top;
    border-bottom: 1px solid #9900FF;
    padding-bottom: 2px;
    }
    
    .channelBackgroundNoBorder {
    background-image: url(../images/your-banner-filename.jpg);
    background-repeat: no-repeat;
    background-position-x: left;
    background-position-y: top;
    border-bottom: 1px none #9900FF;

Changing the Background Color

ProcedureTo Change the Background Color

Steps
  1. Go to the Enterprise Sample CSS directory located under the portal data directory, PortalServer-DataDir/portals/portal-ID/web-src/enterprise/css.

  2. Modify the CSS file in the appropriate places.

    Consider the following example where the defaultBody and altShortBody have been modified:


    defaultBody {...
    background-color: #your-hex-color-code
    }
    
    altShortBody {...
    background-color: #your-hex-color-code
    }

Modifying the Color Gradient Image

The gradient serves as the background color to the channels.

ProcedureTo Modify the Color Gradient Image

Steps
  1. Go to the Enterprise Sample CSS directory located under the portal data directory, PortalServer-DataDir/portals/portal-ID/web-src/enterprise/css.

  2. Modify the CSS file in the appropriate place.

    For example, replace the image channel-gradient-orange.gif with your new color gradient image.

    The following is a listing of the location of JSP and image files for the Enterprise Sample logo and banner.

    ASC Logo

    Files altShortBody-asc-logo.gif and asc-logo-8.png

    Located at PortalServer-DataDir/portals/portal-ID/web-src/enterprise/images directory

    ASC Banner

    File Header-alone-no-logo.jpg

    Located in PortalServer-DataDir/portals/portal-ID/web-src/enterprise/images directory

    ASC Title

    File title.jsp

    Located at PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample

    User Info Form

    File anonymous.jsp

    Located at PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/ASCTabContainerProvider

    Banner Background Color

    PortalServer-DataDir/portals/portal-ID/web-src/enterprise/css

    Other Background and Positions

    PortalServer-DataDir/portals/portal-ID/web-src/enterprise/css

Accessing the Portal Desktop Administration Screen

ProcedureTo Administer the Enterprise Sample Desktop via the Portal Server Management Console

Steps
  1. Login to the Portal Server management console as administrator (amadmin).

  2. Click the Portals tab.

  3. Click the Portal ID in the Portals list.

  4. Select Enterprise Sample [Org] from the Select DN list.

  5. Click Manage Containers and Channels.

    You can administer channels and containers used by the Enterprise Sample from this page.