留言板
How to change logo's link
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
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
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>
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>
Hi,
thanks for suggestions 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
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?
thanks for suggestions 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?
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.
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?
How are you changing your url? Are you providing full url?
I change it through portal_normal.vm - is this what you're asking about?
I'm editing this part:
I'm editing this part:
<h1 class="company-title">
<a class="logo" href="" title="#language(" go-to")">
<span></span>
</a>
</h1>
What did you change your url to? Something like http://www.liferay.com/community/
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.....
As a side note - it's great Liferay has such powerful customisation mechanisms, but they'd be of much more use if working.....
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.
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.
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.
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.