Saturday, August 22, 2015

Basic Web Content in Liferay

Today we will discuss about Basic Web Content in Liferay. But before that we must know what is Web Content.

A web content is a simple static content that can be displayed on a web page. 

Liferay provide a simple way to achieve this . Here we don't need to create any Portlet Just simply use WYSIWUG  HTML editor to create a web content and add to our page.

So lets start this Step by Step:-

Step 1:-Create Web Content
For creating web content Go to:-

Admin->Content->Web Content(On LHS)->Add-> Basic Web Content.

Then Provide Title. Now you have to ways to add the Content:-

A)By Using WYSIWUG Editor
Liferay provide What you see is what you get(WYSIWUG) HTML editor. Here you just use the buttons to create the content.You can provide link ,change text size etc using this.

B)By Directly Pasting HTML file
For This Just Click Source Button and use HTML tags:-

Step 2(Optional):-Set Other Properties

A)Expiration and Review Time
You can set expiration time of web content so that the web content automatically expired on that date here i am using Never. For this Click on Schedule :-

You can provide description  about your web content by Clicking on Abstract as:-

Step 3:-Display Web Content on Page
Go to your home page(http://localhost:8080/) click on add symbol and add web content display portlet on your page and than click on select web content as:-

After that a window is open Click your web content and than press Save Button thats it refresh the page and you web Content is displayed on the page as:-

Step 4:-Database tables
Here we see database tables where all these things are stored :-

As usual when ever you create an asset like upload image in liferay ,create folder etc an entry is put in this table which contain creation date, groupId, companyId etc.

As usual when ever you create an asset like upload image in liferay.This table contain the main data ie title,description, expiration date, review date ,content etc.

Content is stored in xml format in content column as:-

This table is mapping table between assetentry and journalarticle table as resourceprimkey column in journalarticle table is same as classPk column in assetentry table.

Note:- I hide the other fields in tables SnapShots.

Thats it Hope this will Help.

Related Post:-

No comments:

Post a Comment

Total Pageviews

Number Of Unique Visitor

Free counters!