I need help in printing private and public sites of which the user is a member.
By resuing the code from the post (How do I get Sites of which the user is a member in Liferay theme?) I am able to get the sites, but it gives users' private and public pages too.
How to avoid printing user's private and public pages, since I need only Communities or rather Sites.
<ul>
#foreach($site in $user.mySites)
#if ($site.hasPrivateLayouts())
<li><a href="/group${site.friendlyURL}">$site.descriptiveName</a></li>
#end
#if ($site.hasPublicLayouts())
<li><a href="/web${site.friendlyURL}">$site.descriptiveName</a></li>
#end
#end
</ul>
Environment: Liferay 6.1
Thanks