Hi,
I see the topic was investigated bevore. But I have the specific problem to get custom attrs values for a website.
I defined the custom attr "Type" for Websites to handle different sites according to their type.
Know I want to disply in the theme "portal_normal.vm" a menu with all sites of a specific type, say "city"
1. First Try:
...
#set ($groupLocalService = $serviceLocator.findService("com.liferay.portal.service.GroupLocalService"))
#set ($groupsCount = $groupLocalService.getGroupsCount())
#set ($allGroups = $groupLocalService.getGroups(0, $groupsCount))
#set ($gtyp = $group.getExpandoBridge().getAttribute("Type") )
...
2. Try:
...
#set ($gtyp = $group.getLayout().getExpandoBridge().getAttribute("Typ") )
...
3. Try
#set ($gtyp = $expandoValueLocalService.getData($group.getGroupId(),"com.liferay.portal.model.Website", "CUSTOM_FIELDS", "Typ", ... );
I also try to get webseites with webseiteLocalService
##set ($websiteService = $serviceLocator.findService("com.liferay.portal.service.WebsiteLocalService"))
##set ($sitesCount = $websiteService.getWebsitesCount())
##set ($allSites = $websiteService.getWebsites() )
##<h1> Anzahl = $sitesCount </h1>
But I didn't succed in all!:-). I am not a velocity programmer.
How to manage that?
Thanks,
Morad.
不適当であることを指摘する場合は、ログインしてください。