Combination View Flat View Tree View
Threads [ Previous | Next ]
Morad Ahmad
Access WebsiteLocalService in velocity
August 27, 2012 7:38 AM
Answer

Morad Ahmad

Rank: Junior Member

Posts: 62

Join Date: June 16, 2010

Recent Posts

Hi,

I try to access the WebsiteLocalService in my theme:

##set ($websiteService = $serviceLocator.findService("com.liferay.portal.service.WebsiteLocalService"))
##set ($groupsCount = $websiteService.getWebsitesCount())
##set ($allGroups = $websiteService.getWebsites() )

and for testing:

##<h1> Count = $groupsCount </h1>

but I got 0 as result althoug I have 5 websites in my portal configured?

My target is to read a custom attribut I assigned to "Website" ??

Thanks,
Morad.