When developing custom themes, we need to use Liferay services in VM. Its quite easy but tricky. So, putting here a simple example-
Write following in init-custom.vm
Now you can use this service as follows:
where $myPlace is a group.
Hope this will help.
Write following in init-custom.vm
#set($organizationLocalService = $serviceLocator.findService(
"com.liferay.portal.service.OrganizationLocalServiceUtil"
))
Now you can use this service as follows:
#set ($org = $organizationLocalService.getOrganization($myPlace.getClassPK())) |
Hope this will help.
No comments:
Post a Comment