im trying to create a community select box to enable visitors to jump to open Liferay communities. However it only seems to work for authenticated users. So how I can list 'open' communities to all users including logged out users?
Here's my current code
#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