Favicon

Introduction #

Favicon is the Favorites Icon when someone bookmarks your site. This article outlines ways to change the favicon for your Liferay portal installation.

For Liferay versions previous to 6.0, the favicon image was named as liferay.ico

For Liferay versions 6.0+, the favicon image is named as favicon.ico

Method 1 #

Modify your portal-ext.properties file (if it supports that):

    #
    # Set the theme's shorcut icon.
    #
    theme.shortcut.icon=liferay.ico

Method 2 #

By dropping your own icon with the same name as the Liferay icon, your icon will appear as the bookmark/favorites icon instead of the Liferay icon.

The icon is located under:

 /Your_Theme/html/themes/example/images/liferay.ico

An example:

 /portal-web/docroot/html/themes/brochure/images

If you create your own theme with the Plugins SDK, place the icon in themes/Your_theme/docroot/_diffs/images/liferay.ico

Method 3 #

Another method to changing the icon, is to replace the icon with your own icon by editing the “Top_Head.jsp”

 <link rel="Shortcut Icon" href="<%= themeDisplay.getPathThemeImage() %>/liferay.ico" />

You’ll then need to change liferay.ico to your_icon.ico and place the icon in your /images folder under your theme.

0 附件
58853 查看
平均 (4 票)
满分为 5,平均得分为 4.0。
评论
讨论主题回复 作者 日期
or you can change at portal.properties... delang j 2008年11月3日 上午2:58
@delang j Actually no delangm, cause... Luis Salas Araya 2009年9月9日 下午2:56
in the 5.2.3, I change the two icons to my own... li guicheng 2010年4月20日 上午1:56
oh, I delete the ext and rebuild the project,... li guicheng 2010年4月20日 下午9:01
With Liferay6, for method 2, it's using... Roshan Qureshi 2012年5月4日 上午5:52
Hi Roshan, I am using Liferay6 so I put... Neetu Mishra 2012年7月30日 下午9:37
The filename must be favicon.ico, not... Miguel Gil 2012年10月23日 上午1:32
I deleted liferay.ico in /webapps root Miguel Gil 2012年10月23日 上午1:32

or you can change at portal.properties
theme.shortcut.icon=liferay.ico
在 08-11-3 上午2:58 发帖。
@delang j

Actually no delangm, cause portal.properties is meant to exist untouched, thats why portal-ext.properties exists
在 09-9-9 下午2:56 发帖。
in the 5.2.3, I change the two icons to my own icons with the same name (liferay.ico) in portal-web/docroot/html/themes/_unsthled/images/liferay.ico and portal-web/docroot/html/themes/control_panel/images/liferay.ico ,but the favorites icon still the liferay ico.

somebody knows more?

and I also want to change the icon left to the "Control Panel", too.

thx

liguicheng2006@163.com
在 10-4-20 上午1:56 发帖。
oh, I delete the ext and rebuild the project, and it do change to my own icons.
在 10-4-20 下午9:01 发帖。
With Liferay6, for method 2, it's using favicon.ico instead of liferay.ico
so need to have a file named favicon.ico
在 12-5-4 上午5:52 发帖。
Hi Roshan,

I am using Liferay6 so I put favicon.ico under /my_theme/docroot/_diffs/images but it still not reflecting in my portal emoticon
I am using method2. Do I need to add something?
在 12-7-30 下午9:37 发帖以回复 Roshan Qureshi
The filename must be favicon.ico, not liferay.ico

/Your_Theme/html/themes/example/images/favicon.ico
在 12-10-23 上午1:32 发帖。
I deleted liferay.ico in /webapps root
在 12-10-23 上午1:32 发帖以回复 Miguel Gil