Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sebastien Diot
Problem replacing default logo
January 1, 2010 5:09 AM
Answer

Sebastien Diot

Rank: Junior Member

Posts: 35

Join Date: February 10, 2009

Recent Posts

I've just setup liferay (Liferay Portal Standard Edition 5.2.3) on my website, and I replaced the default logo in Control Panel > Settings > Display Settings. It shows everywhere when I'm logged-in, but it doesn't show when I'm not logged in. Then only Liferay's default logo shows. This is quite annoying, as I've searched for this, and all that people say is to do exactly what I've done, but it doesn't work. I've tried restarting, and clearing the different server caches, and the browser cache, but all to no avail.
Ashutosh Shrivastava
RE: Problem replacing default logo
January 1, 2010 5:16 AM
Answer

Ashutosh Shrivastava

Rank: New Member

Posts: 8

Join Date: December 3, 2009

Recent Posts

1. check in themes directory you would get some pointers +
2. The image actually gets picked from classpath. You might want to explore that if it works for you.
Jonas Yuan
RE: Problem replacing default logo
January 1, 2010 8:09 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Sebastien

You may try following options (for any application servers, like Tomcat, Glassfish, JBoss, Resin, Geronimo, Jetty, JonAS, etc.).

Customize Default Images
By the way, there are a set of default images you may want to override. Of course, you would be able to customize the portal in many ways without involving any Java code.
1image.default.spacer=com/liferay/portal/dependencies/spacer.gif
2image.default.company.logo=com/liferay/portal/dependencies/company_logo.png
3image.default.organization.logo=com/liferay/portal/dependencies/organization_logo.png
4image.default.user.female.portrait=com/liferay/portal/dependencies/user_female_portrait.png
5image.default.user.male.portrait=com/liferay/portal/dependencies/user_male_portrait.png

As shown in above code, the property image.default.spacer sets the location of the default spacer image that is used for missing images; the property image.default.company.logo sets the location of the default company logo image that is used for missing company logo images; the property image.default.organization.logo sets the location of the default organization logo image that is used for missing organization logo images; while both image.default.user.female.portrait and image.default.user.male.portrait set the locations of the default user portrait images that are used for missing user portrait images. Note that these images must be available in the class path.

How to customize default images? There are two options to override default images.

1) Create a class path ${class.path} equal to /com/liferay/portal/dependencies under the folder $PORTAL_ROOT_HOME/WEB_INF/classes first; and then put customized images as same image file name in the class path ${class.path};

2) Override properties with a class path ${class.path} plus customized image file names in portal-ext.properties first; and then create the class path ${class.path} under the folder $PORTAL_ROOT_HOME/WEB_INF/classes and put customized images in it.

For example, supposed that you have your own company logo named "PalmTree_logo.png", you’re going to override default company logo with your company logo.



For the first option, you create a class path ${class.path} equal to /com/liferay/portal/dependencies under the folder $PORTAL_ROOT_HOME/WEB_INF/classes; copy “PalmTree_logo.png” to ${class.path}, and rename “PalmTree_logo.png” to “company_logo.png”.

For the second option, supposed that the class path ${class.path} is equal to com/liferay/portal/dependencies/, you could add the following line at the end of portal-ext.properties; create the class path ${class.path} under the folder $PORTAL_ROOT_HOME/WEB_INF/classes and copy “PalmTree_logo.png” to ${class.path}.
1image.default.company.logo=com/ext/dependencies/PalmTree_logo.png

In the same pattern, you would be able to customize other default images as well.

Abstracted from the book:
Liferay Portal 5.3 Enterprise Intranets

Please let me know whether it helps or not.

Refer to the same at
Company Logo and Banner (5.2.3)

Jonas Yuan
-----------------
The Author of Liferay Books:
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Sebastien Diot
RE: Problem replacing default logo
January 4, 2010 1:43 PM
Answer

Sebastien Diot

Rank: Junior Member

Posts: 35

Join Date: February 10, 2009

Recent Posts

Thank you for your reply. Firstly, I forgot to say that I am using the Tomcat bundle. I tried both possibilities that you described, and did not achieve any result. So I pondered this for a few days, and found out what it is today: I am using the "Liferay Noir" theme for the "front page", and just discovered that it uses it's own logo, under a completely different path. So it's a "theme bug", so to speak, but now I know how to fix it.
Srilalitha Pusuluri
RE: Problem replacing default logo
February 1, 2013 1:17 PM
Answer

Srilalitha Pusuluri

Rank: New Member

Posts: 11

Join Date: February 24, 2012

Recent Posts

I am using 6.1 with tomcat 7. I am using 6.1 with tomcat 7. I am trying to set a default company logo per theme. I have 5 different themes I am building. They all need to have different company logos. Any suggestions on how to implement it ?
So far I have tried putting my logo image under tomcat-7.0.25\webapps\my-theme\WEB-INF\classes\ and in portal-ext.properties set the “image.default.company.logo=my_logo.png”
On top of this I want to give the user the option to change the logo from the control panel.
Hitoshi Ozawa
RE: Problem replacing default logo
February 2, 2013 3:48 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7952

Join Date: March 23, 2010

Recent Posts

I am using 6.1 with tomcat 7. I am using 6.1 with tomcat 7. I am trying to set a default company logo per theme. I have 5 different themes I am building. They all need to have different company logos. Any suggestions on how to implement it ?


Srilalitha, this is a very old thread and the topic of this thread is about using Liferay 5. If you are going to post a new question, please create a new thread. That's the rule of this forum.