Thursday, January 13, 2011

Theme and layout in liferay

Create Theme and layout in one war.

1)Create a folder under plugins\themes\your-theme\docroot (e.g layout).
2)Add all the files Under your folder (e.g layout).
a.your_layout.tpl
b.your_layout.wap.tpl
c.your_layout.png
3)Add the files of your theme directly under the docroot/WEB-INF.
a.liferay-layout-templates.xml
4)Edit the file liferay-look-and-feel.xml present in the WEB-INF directory and add the following XML fragment.
<layout-templates>
<custom>
<layout-template id=" your_layout_Id" name=" your_layout_name">
<template-path>/layout/ your_layout.tpl</template-path>
<wap-template-path>/layout/your_layout.wap.tpl</wap-template-path>
<thumbnail-path>/layout/your_layout.png</thumbnail-path>
</layout-template>
</custom>
</layout-templates>
5)Then ant deploy from your theme level.

No comments:

Post a Comment