This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. Themes (WAP)
Table of Contents [-]
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.