« Back to Themes

Themes (WAP)

Themes customize the overall look and feel of Liferay and were introduced in version 3.5 of the portal. With Liferay version 4.3, we now have a WAP theme that is designed to run on mobile devices.

Overview #

To find out where to start, look at liferay-look-and-feel.xml found in the \trunk\portal-web\docroot\WEB-INF\ folder.

 	<theme id="mobile" name="Mobile">
 		<root-path>/wap/themes/${theme-id}</root-path>
 		<wap-theme>true</wap-theme>
 	</theme>

This is very similar to our other themes except it has this attribute:

 <wap-theme>true</wap-theme>

This tells the portal that the theme was developed for a mobile device.

You also notice the addition of a wap folder in \trunk\portal-web\docroot\.

To make a theme show up correctly in a mobile device, you need this doc type:

 <?xml version="1.0"?>
 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.wapforum.org/DTD/xhtml-mobile11.dtd">

Make sure all your tpl, jsp, and VM files adhere to this standard.

New template files have been created for mobile display. If you look at liferay-layout-templates.xml. You see entries for for .wap.tpl files like the follow:

 <wap-template-path>/html/layouttpl/custom/1_column.wap.tpl</wap-template-path>

In the 4.3 \trunk\themes\ folder, you'll find a sample wap theme called sample-base-wap-theme.war. Use this as your template for custom wap themes.

Database Changes#

The Layout table also has addition fields for wapThemeId and wapColorSchemeId.

See Also#

0 Attachments
23093 Views
Average (0 Votes)
Comments

Showing 0 Comments