In Liferay 6.1 custom theme - How can I get Sites for a user that it is a member of in a theme?
I have seen how the dockbar Go to/My sites
gets generated via the Liferay UI taglib.
However, I want to get a list of user's sites and list them as part of super navigation bar separate from the dockbar options.
Is this possible and what is the API call to get the user's sites in a list?
Thanks in advance.
From the user object you can retrieve the groups he belongs to:
This returns a
List<Group>
. Once you have theGroup
you can easily build a URL to the public and private pages of this group: