Fórum
How to Link Compony Logo with external URL instead of FrindlyURL
Nitesh Sahay, modificado 10 Anos atrás.
How to Link Compony Logo with external URL instead of FrindlyURL
Junior Member Postagens: 58 Data de Entrada: 28/11/11 Postagens Recentes
I want to set the logo of organization and links to it's site after login to portal.
I can able to set the the compony logo and name by setting the value in vm variables in service pre event.And customize the theme accordingly.
But i want to link the Company logo with external url(it should be dynamic) instead of friendly URL.
Lifery always create renderURL for all the anchor tag i found.Is there any way to set external url instead of friendly URL.
Thanks in advance.
I can able to set the the compony logo and name by setting the value in vm variables in service pre event.And customize the theme accordingly.
<header id="banner" role="banner">
<div id="top-section">
<div id="heading">
#if ($is_signed_in)
<h1 class="site-title">
<a class="$logo_css_class" href="$company_site_default_url" title="#language(" go-to") $company_site_name">
<img alt="$company_logo_description" height="60" src="$images_folder/$company_site_logo">
</a>
</h1>
#else
----------
</div>
</div>
</header>
But i want to link the Company logo with external url(it should be dynamic) instead of friendly URL.
Lifery always create renderURL for all the anchor tag i found.Is there any way to set external url instead of friendly URL.
Thanks in advance.
Apoorva Prakash, modificado 10 Anos atrás.
RE: How to Link Compony Logo with external URL instead of FrindlyURL
Liferay Master Postagens: 658 Data de Entrada: 15/06/10 Postagens RecentesNitesh Sahay:
I want to set the logo of organization and links to it's site after login to portal.
I can able to set the the compony logo and name by setting the value in vm variables in service pre event.And customize the theme accordingly.<header id="banner" role="banner"> <div id="top-section"> <div id="heading"> #if ($is_signed_in) <h1 class="site-title"> <a class="$logo_css_class" href="$company_site_default_url" title="#language(" go-to") $company_site_name"> <img alt="$company_logo_description" height="60" src="$images_folder/$company_site_logo"> </a> </h1> #else ---------- </div> </div> </header>
But i want to link the Company logo with external url(it should be dynamic) instead of friendly URL.
Lifery always create renderURL for all the anchor tag i found.Is there any way to set external url instead of friendly URL.
Thanks in advance.
There are two possible ways:
- Create a hook, with searvice pre action. Create custom velocity variable having value of external URL you want to hyperlink. Use this in your theme velocity template.
- save the external URL in expando attribute and fetch the same directly in theme velocity template.
HTH.
Nitesh Sahay, modificado 10 Anos atrás.
RE: How to Link Compony Logo with external URL instead of FrindlyURL
Junior Member Postagens: 58 Data de Entrada: 28/11/11 Postagens Recentes
Hi Apporva,
Thanks for reply.I have already created hook with service pre event and set company_site_default_url in VM variables .But i found the url becomes prefixed by the default base URL and this lid to redirect to some status not found page of liferay portal.
For example... I set "www.google.com" to company_site_default_url but when click on the logo link it redirect to
Any suggestions... thanks in advance.
Thanks for reply.I have already created hook with service pre event and set company_site_default_url in VM variables .But i found the url becomes prefixed by the default base URL and this lid to redirect to some status not found page of liferay portal.
For example... I set "www.google.com" to company_site_default_url but when click on the logo link it redirect to
http://localhost:8080/group/www.google.cominstead of
www.google.com.
Any suggestions... thanks in advance.
Apoorva Prakash, modificado 10 Anos atrás.
RE: How to Link Compony Logo with external URL instead of FrindlyURL
Liferay Master Postagens: 658 Data de Entrada: 15/06/10 Postagens RecentesNitesh Sahay:
Hi Apporva,
Thanks for reply.I have already created hook with service pre event and set company_site_default_url in VM variables .But i found the url becomes prefixed by the default base URL and this lid to redirect to some status not found page of liferay portal.
For example... I set "www.google.com" to company_site_default_url but when click on the logo link it redirect tohttp://localhost:8080/group/www.google.cominstead ofwww.google.com.
Any suggestions... thanks in advance.
Create a new Velocity variable, say company_site_default_ext_url, and now use the following in your templete:
<a class="$logo_css_class" href="$company_site_default_ext_url" title="#language(" go-to") $company_site_name">
<img alt="$company_logo_description" height="60" src="$images_folder/$company_site_logo">
</a>
HTH.
Nitesh Sahay, modificado 10 Anos atrás.
RE: How to Link Compony Logo with external URL instead of FrindlyURL
Junior Member Postagens: 58 Data de Entrada: 28/11/11 Postagens Recentes
Thanks for the response.But sorry to say still its not working.....
Ryan Schuhler, modificado 10 Anos atrás.
RE: How to Link Compony Logo with external URL instead of FrindlyURL
Junior Member Postagens: 77 Data de Entrada: 06/07/12 Postagens Recentes
I havent tested this for your specific problem, but sometimes I know you have to add the "http://" in front of the url. It might be worth a try make the link you enter "http://www.google.com" instead of "www.google.com". Not sure if it will work, but its worth a try.
Bruno Lima, modificado 9 Anos atrás.
RE: How to Link Compony Logo with external URL instead of FrindlyURL
Junior Member Postagens: 49 Data de Entrada: 20/05/14 Postagens Recentes
Yes, I've tested right now and worked fine on 6.2 EE!