Often there are requirements to show customized logo image according to portal's current locale. In Liferay Portal there is no way achieve this but locale specific logo can applied by using the theme.
In theme, portal_normal.vm contains the following statement to display logo -
<a href="$company_url" title="#language("go-to") $company_name">
<span>$company_name</span>
</a>
Here you can place check for the locale and accordingly change the logo image -
<a href="$company_url" title="#language("go-to") $company_name">
#if($locale == "en_US")
<img src="englishlogoimage" />
#else
<img src="spanishlogoimage" />
#end
</a>
but now you can't manage the logo from the community settings as image urls are hardcoded in the theme. To make it manageable you can use web content to render the logo image.
Any comments or suggestions will be appreciated ....
Showing posts with label liferay themes. Show all posts
Showing posts with label liferay themes. Show all posts
Thursday, July 21, 2011
Localization Specific Logo Image : Liferay Portal
Wednesday, February 23, 2011
Creating and Applying Different Liferay themes to Pages
Here is an example of how to apply different themes on pages in Liferay. Here we have created two themes-
1. First of all in the liferay-look-and-feel.xml file, create two different theme entries that refer to the same theme but have a different value for the header-type setting:
Both the theme entries refer to same theme but they different value for their header-type setting. We can access the settings programmatically in our theme template and then take action based on the settings we have defined.
When this theme is deployed to Liferay, it will display to the user as two different themes.
2. Accessing the settings in portal_normal.vm template file
In the above code we accessed the settings defined in the liferay-look-and-feel.xml file and based on the value of the setting we are parsing different template files.
1. First of all in the liferay-look-and-feel.xml file, create two different theme entries that refer to the same theme but have a different value for the header-type setting:
Both the theme entries refer to same theme but they different value for their header-type setting. We can access the settings programmatically in our theme template and then take action based on the settings we have defined.
When this theme is deployed to Liferay, it will display to the user as two different themes.
2. Accessing the settings in portal_normal.vm template file
In the above code we accessed the settings defined in the liferay-look-and-feel.xml file and based on the value of the setting we are parsing different template files.
Subscribe to:
Posts (Atom)