Tribune

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

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Sebastien Diot
Problem replacing default logo
1 gennaio 2010 5.09
Risposta

Sebastien Diot

Punteggio: Junior Member

Messaggi: 35

Data di Iscrizione: 10 febbraio 2009

Messaggi recenti

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
1 gennaio 2010 5.16
Risposta

Ashutosh Shrivastava

Punteggio: New Member

Messaggi: 8

Data di Iscrizione: 3 dicembre 2009

Messaggi recenti

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
1 gennaio 2010 8.09
Risposta

Jonas Yuan

Punteggio: Liferay Master

Messaggi: 993

Data di Iscrizione: 26 aprile 2007

Messaggi recenti

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
4 gennaio 2010 13.43
Risposta

Sebastien Diot

Punteggio: Junior Member

Messaggi: 35

Data di Iscrizione: 10 febbraio 2009

Messaggi recenti

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
1 febbraio 2013 13.17
Risposta

Srilalitha Pusuluri

Punteggio: New Member

Messaggi: 11

Data di Iscrizione: 24 febbraio 2012

Messaggi recenti

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
2 febbraio 2013 3.48
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

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.