コミュニティ選択ボックスを作成して、訪問者が Liferay コミュニティを開くことができるようにしようとしています。ただし、認証されたユーザーに対してのみ機能するようです。では、ログアウトしたユーザーを含むすべてのユーザーに「オープン」コミュニティを一覧表示するにはどうすればよいでしょうか?
これが私の現在のコードです
#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