0
即時通訊設法創建一個社區選擇框,使訪客能夠跳轉到打開Liferay社區。但它似乎只適用於經過身份驗證的用戶。那麼,我如何能夠向所有用戶列出「開放」社區,包括註銷用戶?如何列出社區以在Liferay 6中「登錄」出用戶?
這裏是我當前的代碼
#set ($myPlaces = $user.getMyPlaces())
#if($listTool.size($myPlaces) > 0)
<select id="communitySelector">
#foreach ($myPlace IN $myPlaces)
#if ($myPlace.isCommunity())
#set ($myPlaceURL = ${myPlace.getFriendlyURL()})
## Only link if theres pages
#if ($myPlace.hasPublicLayouts())
## Prefix web for 'public'
#set ($myPlaceURL = "${public_pages_url}${myPlaceURL}")
## Select if current community
#set($commSelected = "")
#if($themeDisplay.getLayout().getGroup().getName() == $myPlace.getName())
#set($commSelected = " selected='selected' ")
#end
<option $commSelected value="${portal_url}${myPlaceURL.toString()}">$myPlace.getName()</option>
#end
#end
#end
</select>
#end
所以我想通了MyPlaces中只填入登錄用戶:(。創建用戶的唯一解決方案是將其分配給所有可用的社區,並嘗試列出該用戶ID的社區? – htmlr 2012-02-04 02:03:23