How to configure the Detail portlet of User Application to dynamically load images

  • 7002485
  • 28-Jan-2009
  • 26-Apr-2012

Environment

Novell Identity Manager User Application 3.5.1
Novell Identity Manager User Application 3.6.0
Novell Identity Manager User Application 3.6.1

Situation

How to configure the Detail portlet of User Application to dynamically load images.

Resolution

To display images that are stored in your Identity Vault (such as user photos), you can add the attribute name using the HTML Layout Editor. For example, adding the User Photo attribute displays the user’s photo. If you store images outside the Identity Vault, you’ll need to use the IMG: tag (from the View Source mode of the HTML Editor) as follows:

  1. Go to the portlet’s preferences and access the HTML Editor.

  2. Click View Source.

  3. Use the IMG: tag to combine a location, an attribute key, and a file extension using a syntax like this:

    $[[IMG:”URL” + attribute-key-name + ”fileextension”]] 

The following example shows the syntax you would use if you stored employee photos as JPG images by Last Name in the /images subdirectory of your application server:

$[[IMG:"http://myhost:8080/images/"+LastName+".jpg"]]

At runtime, the portlet concatenates the URL with the LastName attribute and the file extension.jpg.

The HTML Editor supports a flexible syntax. It supports any combination of text and attributes so that the syntax is

$[[IMG:”some text” + attribute-key-name + ...]]