14 August, 2012

Terms of use page in Liferay 6.1

Hi Everyone,

If you want to use web content as a terms of use page we have 2 scenario.

First Scenario :

You can simply set below propeties in portal-ext.properties file  :


you can get article id and group id from control panel as shown in below screenshots:
Here Article Id is 13918:
Article Id

Here Group Id is 10180:
Second Scenario :
With this scenario you can get article id from article title and group id dynamically.
So you don't need to manually do any settings.

Just follow below steps:

1) Create web content with title "terms-of-use"
2) Replace below section of code in your terms_of_use.jsp page with

<%@page import="com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil"%>

<c:when test="<%= (themeDisplay.getScopeGroupId() > 0) && Validator.isNotNull(String.valueOf(JournalArticleLocalServiceUtil.getArticleByUrlTitle(themeDisplay.getScopeGroupId(),"terms-of-use").getArticleId())) %>">
            <liferay-ui:journal-article groupId="<%= String.valueOf(themeDisplay.getScopeGroupId()) %>" articleId="<%= String.valueOf(JournalArticleLocalServiceUtil.getArticleByUrlTitle(themeDisplay.getScopeGroupId(),"terms-of-use").getArticleId())  %>" />

Now check the functionality

Rate Me:

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...