Monday, August 24, 2015

Categorization in Web Content

Today we will discuss about Categorization in Web Content . Here we create multiple web contents and display them based on categories by using Asset Publisher Portlet. Before reading this blog it is highly recommended to read my previous blog on Basic web content in liferay. I already created 4 web content for this blog.

So lets start step by step:-

Step 1:-Create Web Content
Just create 4 basic web contents as discussed in my previous blog .

Step 2:-Create Vocabulary
Go to Admin->Content->Categories->Add Vocabulary

Then provide name and description and click save

Step 3:-Create Categories inside Vocabulary
Select Vocabulary(Mobile) and click Add Category :-

Then Provide name and description for the categories as:-

Here you can see mobile is already selected  in drop down box. Similarly create two more categories Sony and front camera .

Step 4:-Assign Category to a Web Content
Go to web content you already created in step 1 and select web content here i am selecting Nokia Lumia 520 and click on categorization and then a new window is open .From there you can select the categories you created here i am selection Nokia :-

Now Similarly open other web contents and give categories.for ex -

a)Sony Xperia C has two Categories front camera and Sony.
b)Sony Xperia L has two Categories front camera and Sony.
c)Nokia Lumia 620 has two Categories front camera and Nokia.

Step 5:-Add Asset Publisher Portlet to Page
Go to Add symbol click Application and select Asset Publisher 

As soon as you add asset publisher on page all the assets like images, documents and all web contents are displayed.

Step 6:-Configure Asset Publisher
Now click on wrench icon and select Configuration:-

After that a new window is open, apply the configuration here:-
1)In Asset Type select Web Content Article.
2)In Filters select contains, Any, categories. 

Now Click save and refresh the page for output.


1)The Any and All represent AND and OR operation between Categories.
2)Here i am showing some of the configuration there are many others. 

Step 8:-Check Output

1)Selecting Category Nokia only

2)Selecting Category Nokia and Front Camera(Any)

3)Selecting Category Nokia and Front Camera(All)

Step 9:-Database Tables

The Vocabulary mobile is saved in assetvocabulary:-

The categories Nokia, Sony and Front Camera is stored in assetcategory:-

The mapping of which asset is associated with which category is stored in assetentries_assetcategories:-

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!