• Liferay Terms Of Use Customization

    Posted on June 21, 2015 by Hamidul Islam in Liferay.



    Liferay Terms Of Use is highly configurable. When a user logs in for the first time, liferay terms of use is shown to the user. This terms of use can easily be customized according to our requirements. In this article we will focus on different approaches to customize liferay terms of use.


    i) terms_of_use.jsp is responsible for displaying Liferay Terms Of Use page.

    ii) In Liferay Tomcat Bundle (considering liferay tomcat bundle 6.2) the path of this page is 


    iii) In Liferay source code the path of the page is 


    How to disable liferay terms of use:

    By default liferay terms of use is enabled by the property terms.of.use.required=true in portal.properties file. However we can disable terms of use by adding below in portal-ext.properties


    Restart of tomcat server is needed to reflect this change. 

    Customize terms_of_use.jsp by Hook:

    We know that terms_of_use.jsp is the JSP which displays the content of liferay terms of use page. So we can customize this page by simple JSP Hook. At the end of the article download terms-of-use-hook and modify terms_of_use.jsp page according to your needs. After modifying deploy the hook. 

    Liferay terms of use by web content:

    In this approach we can create a web content and tell liferay to use this web content as terms of use content instead of default content. Below are the two properties that we need to add in portal-ext.properties file


    In the above properties we should specify the groupId and article id of the web content. Follow the below steps to know article ID and groupId

    Finding Article ID:

    Go to the control panel and create a web content. I have created web content with name liferay-terms-of-use. After creating the web content publish it. Follow the below screen shot to find out article ID.


    Finding Group ID:

    Group ID is nothing but the Site ID in which our web content belongs. In the above we have created the web content. The web content should be associated with a particular site. So we need the group ID of that site. Refer the below screen shot.


    To find out the final site ID navigate like

    Control Panel -> Sites -> Liferay -> Configuration -> Site Settings


    So according to my web content article id and group id the final properties  in portal-ext.properties will look like


    Check Point:

    Create a new user from the control panel and log into the portal by the new user credentials. You should see below liferay terms of use content.


    Download Source Code:



2 Responses so far.

  1. sanket says:

    very nice article .

  2. Akash says:

    Hi Hamidul,

    How can we use this term of use page on pop-up, when a user first time login the portal that term of use page should come on pop-up!!

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.