Foros de discusión

How to change logo's link

Katarzyna B, modificado hace 11 años.

How to change logo's link

New Member Mensajes: 18 Fecha de incorporación: 7/01/12 Mensajes recientes
Hi,

I'd like to change the URL that community logo (in banner) links to. Right now, on every community it links to Liferay portal's main page.
Any hints how can I do it?

Thanks!
Katarzyna
thumbnail
Shinn Lok, modificado hace 11 años.

RE: How to change logo's link

Junior Member Mensajes: 89 Fecha de incorporación: 14/01/11 Mensajes recientes
By default, the logo links to the site's default url. You can change this in portal_normal.vm of your theme.

<a class="$logo_css_class" href="[color=#ff0000]$CHANGE THIS$[/color]" title="#language(" go-to") $site_name">
	<img alt="$logo_description" height="$site_logo_height" src="$site_logo" width="$site_logo_width">
</a>
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: How to change logo's link

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
By default, the logo links to the site's default url. You can change this in portal_normal.vm of your theme.


There's isn't "community" in Liferay 6.1.0 so he's probably using 6.0.6 or earlier.

In 6.0.6, it's the following code in webapps\ROOT\html\themes\classic\templates\portal_normal.vm

<a class="logo" href="$company_url" title="#language("go-to") $company_name">
<span>$company_name</span>
</a>
Katarzyna B, modificado hace 11 años.

RE: How to change logo's link

New Member Mensajes: 18 Fecha de incorporación: 7/01/12 Mensajes recientes
Hi,

thanks for suggestions emoticon I will provide you also with some details - we're using Liferay 6.0.6, and the case are only "Communities", which in Liferay API are called "companies" (correct me if I'm wrong, please).

I have this code set in theme's portal_normal.vm

<h1 class="company-title">
               <a class="logo" href="$company_url" title="#language(" go-to") $company_name">
                      <span>$company_name</span>
              </a>
</h1>


Unfortunately it doesn't work - the link under logo is http://localhost:8081/web/guest which matches <portal_url>/<default_landing_page>.

Is this a Liferay bug?
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: How to change logo's link

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
nd the case are only "Communities", which in Liferay API are called "companies" (correct me if I'm wrong, please).


Liferay instances are "companies". "Communities" are "groups".

Unfortunately it doesn't work - the link under logo is http://localhost:8081/web/guest which matches <portal_url>/<default_landing_page>.


Did you clear your cache? I think I've tested this.
Katarzyna B, modificado hace 11 años.

RE: How to change logo's link

New Member Mensajes: 18 Fecha de incorporación: 7/01/12 Mensajes recientes
Hitoshi Ozawa:
Did you clear your cache? I think I've tested this.


Yes, I have...

Still no success with this problem, but I found some strange behaviour - if I leave the href attribute empty - then it will link curent page.
Any tips here are welocome. Maybe there is a list of Liferay's velocity variables available somewhere?
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: How to change logo's link

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
How are you changing your url? Are you providing full url?
Katarzyna B, modificado hace 11 años.

RE: How to change logo's link

New Member Mensajes: 18 Fecha de incorporación: 7/01/12 Mensajes recientes
I change it through portal_normal.vm - is this what you're asking about?
I'm editing this part:
<h1 class="company-title">
				<a class="logo" href="" title="#language(" go-to")">
					<span></span>
				</a>
			</h1>
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: How to change logo's link

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
What did you change your url to? Something like http://www.liferay.com/community/
Katarzyna B, modificado hace 11 años.

RE: How to change logo's link

New Member Mensajes: 18 Fecha de incorporación: 7/01/12 Mensajes recientes
Of course I can give the absolute URL of community as a href attribute, but this will make my theme bounded to this community, and I want to reuse it for others. I seek for something like "$company_url", but a working one ;) and for community.

As a side note - it's great Liferay has such powerful customisation mechanisms, but they'd be of much more use if working.....
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: How to change logo's link

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
I'm confused at what exactly you really want to do. To exactly which page do you want to link to?
The original question was that you want to change theme's url to something else. Are you able to change it to something like http://www.liferay.com/community/ ?
Are you getting any error when you do this?

Exactly what error are you getting and what is your EXACT url when the error occurs.
Katarzyna B, modificado hace 11 años.

RE: How to change logo's link

New Member Mensajes: 18 Fecha de incorporación: 7/01/12 Mensajes recientes
In my theme I'd really love to have a link under logo (banner) that - for whatever community that uses this theme - point's to community's home page.
In other words - If I have 2 communities A and B with their pages using my theme, when I'm on A's pages after clicking on logo I expect to be redirected to A's home page, while on any B's page - logo should link to B's main page.

I don't get any errors, apart from that I cannot find solution to my problem. You've suggested to set href="$company_url" in theme's portal_normal.vm - as an effect I get logo linking to portal's home page (side question - is this expected behaviour?). When I leave "href" attribute empty - it will link to page I'm currently on. None of those (href="$company_url" or href="") is what I look for.