Use Of Liferay Service in Velocity File


While dealing with Liferay theme sometime we need to access data from liferay table.
let say if we need logged in users detail inside our velocity file then in that case we need to fetch user data using user services.

Here is one example by which you can invoke liferay services from velocity file.

Let say you need logged in user's detail .

First of all you need to load services that you want to access.In first line you can see the same. Here we have retrieved logged in user's email id from user object.

If you want to access layout details then below code may help you.

Note : Please ignore "." in above code.
 i added just because # was creating an issue with syntax highlighter.

Next PostNewer Post Previous PostOlder Post Home