Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
biswajit sarkar
theme logo problem
1. März 2012 01:43
Antwort

biswajit sarkar

Rang: Regular Member

Nachrichten: 166

Eintrittsdatum: 17. Oktober 2011

Neue Beiträge

I created a custom theme.
everyrhing working perfect except the logo....

I attach the logo from "Display Settings" but the logo still not appear in my theme.
I dnt find any thing wrong in my code .... anyone know why this happen..

for logo part my code is following

<h1 class="company-title">
<a class="logo" href="$company_url" title="#language("go-to") $company_name">
<span>$company_name</span>
</a>
</h1>
Ravi Kumar Gupta
RE: theme logo problem
1. März 2012 01:45
Antwort

Ravi Kumar Gupta

Rang: Liferay Legend

Nachrichten: 1145

Eintrittsdatum: 23. Juni 2009

Neue Beiträge

Can you please check the logs for errors, if any? Also, are you able to see the updated logo in Display settings.?
biswajit sarkar
RE: theme logo problem
1. März 2012 01:50
Antwort

biswajit sarkar

Rang: Regular Member

Nachrichten: 166

Eintrittsdatum: 17. Oktober 2011

Neue Beiträge

there is no error in log......
and yes Im able to the updated logo in display settings
Ravi Kumar Gupta
RE: theme logo problem
1. März 2012 01:59
Antwort

Ravi Kumar Gupta

Rang: Liferay Legend

Nachrichten: 1145

Eintrittsdatum: 23. Juni 2009

Neue Beiträge

hmm.. are you working on LR6.0.x? Can you check with firebug for any missing resource in "net". It should appear unless css has some fault.

Check for this in firebug, something like should be in css
 1
 2#heading .logo {
 3    background: url("/image/company_logo?img_id=0&amp;t=1330594533550") no-repeat scroll 0 0 transparent;
 4    display: block;
 5    font-size: 0;
 6    height: 76px;
 7    text-indent: -9999em;
 8    width: 209px;
 9}


One clarification though.. are you able to see old logo or no logo at all.. ??
biswajit sarkar
RE: theme logo problem
1. März 2012 02:03
Antwort

biswajit sarkar

Rang: Regular Member

Nachrichten: 166

Eintrittsdatum: 17. Oktober 2011

Neue Beiträge

Ravi Kumar Gupta:
hmm.. are you working on LR6.0.x? Can you check with firebug for any missing resource in "net". It should appear unless css has some fault.

Check for this in firebug, something like should be in css
 1
 2#heading .logo {
 3    background: url("/image/company_logo?img_id=0&amp;t=1330594533550") no-repeat scroll 0 0 transparent;
 4    display: block;
 5    font-size: 0;
 6    height: 76px;
 7    text-indent: -9999em;
 8    width: 209px;
 9}


One clarification though.. are you able to see old logo or no logo at all.. ??



in display settings I able to see the logo which i save but in home page only link is appear
Ravi Kumar Gupta
RE: theme logo problem
1. März 2012 02:11
Antwort

Ravi Kumar Gupta

Rang: Liferay Legend

Nachrichten: 1145

Eintrittsdatum: 23. Juni 2009

Neue Beiträge

hmm.. which link.. and what about css, did you check that?
biswajit sarkar
RE: theme logo problem
1. März 2012 02:31
Antwort

biswajit sarkar

Rang: Regular Member

Nachrichten: 166

Eintrittsdatum: 17. Oktober 2011

Neue Beiträge

Ravi Kumar Gupta:
hmm.. which link.. and what about css, did you check that?



I check the css..... it not shows in firebug...and the logo still not appear
biswajit sarkar
RE: theme logo problem
1. März 2012 02:50
Antwort

biswajit sarkar

Rang: Regular Member

Nachrichten: 166

Eintrittsdatum: 17. Oktober 2011

Neue Beiträge

If I want to write that css "#heading .logo" in "custom.css"....how can write this class...anyone plz guide
Ravi Kumar Gupta
RE: theme logo problem
1. März 2012 03:00
Antwort

Ravi Kumar Gupta

Rang: Liferay Legend

Nachrichten: 1145

Eintrittsdatum: 23. Juni 2009

Neue Beiträge

That is by default in css files in theme/css folder. If you want to put that, put in custom.css file. There should be a _diff folder in your custom theme. Put custom.css there in css folder.

For more search this site for themes development. If you still facing a problem after that.. let us know.

this should help you.. http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/creating-liferay-them-7
biswajit sarkar
RE: theme logo problem
1. März 2012 04:09
Antwort

biswajit sarkar

Rang: Regular Member

Nachrichten: 166

Eintrittsdatum: 17. Oktober 2011

Neue Beiträge

Ravi Kumar Gupta:
That is by default in css files in theme/css folder. If you want to put that, put in custom.css file. There should be a _diff folder in your custom theme. Put custom.css there in css folder.

For more search this site for themes development. If you still facing a problem after that.. let us know.

this should help you.. http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/creating-liferay-them-7



thanks for your support...
I solve the problem...
here is my code...i add the code (red)
<h1 class="company-title">
<a class="logo" href="$company_url" title="#language("go-to") $company_name"><img alt="" src="$company_logo">
<!--<span>$company_name</span>-->
</img>
</a>

</h1>
Anonym
RE: theme logo problem
6. März 2012 15:34
Antwort

Anonym

Ya the way theme logos are handled have changed. Instead of it being a background image, its an actual <img>.

Here are some Liferay 6.1 logo tips.


you can target the default logo, which is the default Liferay logo by :

 1
 2#heading .site-title .logo.default-logo {
 3            background: url(../images/custom/logo.png) 0 50% no-repeat;
 4            height: 40px;
 5            width: 145px;
 6}
 7
 8#heading .site-title .logo.default-logo img {
 9            display: none;
10}


To target the custom logo use this css

#heading .site-title .logo.custom-logo {

}


When ever I try to update a theme to a new version of Liferay I do a file merge for portal_normal.vm so that I make sure I get the latest features/changes exposed in my theme.
Ravi Kumar Gupta
RE: theme logo problem
6. März 2012 19:47
Antwort

Ravi Kumar Gupta

Rang: Liferay Legend

Nachrichten: 1145

Eintrittsdatum: 23. Juni 2009

Neue Beiträge

hmm.. Thanks Bradley for the note.. I will take care of this in future.. emoticon
Ádám T. Nagy
RE: theme logo problem
21. April 2013 02:21
Antwort

Ádám T. Nagy

LIFERAY STAFF

Rang: New Member

Nachrichten: 5

Eintrittsdatum: 1. Juni 2012

Neue Beiträge

Hi,

I know it is a bit old thread, I just wanted to add something for the records:

To make the theme force to resize a logo image you can use:

1#heading .site-title .logo.default-logo img {
2    height: 32px;
3    width: 100px;
4    /*display: none;*/
5}


Thank you for the tips by the way,
Adam