Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8542749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:08:27+00:00 2026-06-11T12:08:27+00:00

In Liferay 6.1 custom theme – How can I get Sites for a user

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:08:28+00:00Added an answer on June 11, 2026 at 12:08 pm

    From the user object you can retrieve the groups he belongs to:

    $user.mySites
    

    This returns a List<Group>. Once you have the Group you can easily build a URL to the public and private pages of this group:

    <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>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom portlet that I added to Liferay. I am looking for
I am working in Liferay Portal. I have created my custom work flow and
i have little experience with Liferay, builded a couple of sites with static content
I wrote custom servlet in Liferay and want to know which user page calls
I added a custom user field in Liferay, and set a value on a
Have some users in Liferay 4.4.2 that are currently active, all having valid passwords.
Is there a special tag i can use when creating a liferay hook that
I'm trying to enable a custom liferay theme. The theme is located in webapps/ROOT/html
I've create sample theme, i.e. custom.css according to liferay tutorial, and don't know why
In Liferay 6.1 you can attach custom metadata fields to your DLFileEntries. How can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.