XPages Tip: Adding a Favicon

When users view an XPage, they icon they see in the browser tab by default is a Notes icon. In this post, I’ll show how you can change that icon with a theme setting in order to add another nice touch of customization.

Default Favicon

By default, the users will see a Notes icon displayed in the browser tab:

favicon1

Custom Favicon

You can customize the icon that’s displayed in the browser tab globally for the application via the theme using the pageIcon property of ViewRoot.

For example, if I have an image resource in my application named document.png, I can set it as the favicon by adding this to the application theme:

<control>
  <name>ViewRoot</name>
  <property>
    <name>pageIcon</name>
    <value>/document.png</value>
  </property>
</control>

Now I have a custom favicon:

favicon2

If you happen to specify an invalid icon path, this is what it looks like in Firefox:

favicon3

Advertisements

5 responses to “XPages Tip: Adding a Favicon”

  1. Jan Krejcarek says :

    Good tip, thanks a lot! Implemented right away to the app I am currently working on.

  2. Paul Withers (@PaulSWithers) says :

    I’m not sure if things have changed in recent versions, but I found in earlier versions of Domino that the favicon had to be public access in order to display, even if users were logging in. I haven’t revisited that since about 8.5.2 though.

    • Brad Balassaitis says :

      That’s interesting (and I can understand the logic). I’ve only used this in 8.5.3 and have not noticed that, though. Even with Anonymous access for testing and I don’t believe I’ve had to set the image’s public access property.

  3. mshafics045 says :

    Thanks, good information.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: