Total Pageviews

Wednesday, February 8, 2012

Using Web Contents on our portlets's JSP page

Web contents is really a very great feature of Liferay which allows us to create any kind of valid HTML with the help of very good HTML editor and use it on Liferay pages. But the way Liferay provide to use these web contents on the page is using the web content display portlet.

Generally, text on the JSP pages is loaded form properties file. Now what I think if there is some big content, we can load that from web content. That will be very helpful in externalizing. Another advantage is we can load different contents using the same name for different groups. Let's see how is that possible -

Enter the name of the Article in portal-ex.properties-

Now use the following code on JSP-
Hope this will help. Cheers !!!

No comments:

Post a Comment