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 6851667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:16:34+00:00 2026-05-27T01:16:34+00:00

I am installing layouts through the hook with friendly url as follows /cat1/link1, /cat1/link2

  • 0

I am installing layouts through the hook

with friendly url as follows

/cat1/link1, /cat1/link2

and

/cat2/link3, /cat2/link4

I want it insuch a way that when I navigate to cat1/link1

The nav links should be link1 and link2

and when i navigate to cat2/link3

The nav links should be link3 and link4

How can i achive this?

or can anyone suggest how can i group the layouts for multiple sites into different categories in same liferay install?

Thanks..

  • 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-05-27T01:16:35+00:00Added an answer on May 27, 2026 at 1:16 am

    To create organization (this is from seven-cogs StartupAction.java)

    long userId = defaultUserId;
    long parentOrganizationId = OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID;
    
    String name = "7Cogs, Inc.";
    String type = OrganizationConstants.TYPE_REGULAR_ORGANIZATION;
    
    boolean recursable = true;
    long regionId = 0;
    long countryId = 0;
    int statusId = GetterUtil.getInteger(PropsUtil.get("sql.data.com.liferay.portal.model.ListType.organization.status"));
    String comments = null;
    
    ServiceContext serviceContext = new ServiceContext();
    
    serviceContext.setAddCommunityPermissions(true);
    serviceContext.setAddGuestPermissions(true);
    
    Organization organization =
            OrganizationLocalServiceUtil.addOrganization(
            userId, parentOrganizationId, name, type, recursable, regionId,
            countryId, statusId, comments, serviceContext);
    
    Group group = organization.getGroup();
    GroupLocalServiceUtil.updateFriendlyURL(group.getGroupId(), "/7cogs");
    

    Are you sure that you need two organizations and not two communities?

    UPDATE for question in comment:

    To get organization name in theme (velovity) you can use (if you are in organization’s pages (group))

    In portal-ext.properties

    journal.template.velocity.restricted.variables=
    

    In theme vm file

    Liferay 6

    #set($os = $serviceLocator.findService("com.liferay.portal.service.OrganizationLocalService"))
    #set($organization = $os.getOrganization($themeDisplay.getScopeGroup().getOrganizationId()))
    $organization.getName()
    

    Liferay 5.x

    #set($os = $serviceLocator.findService("com.liferay.portal.service.OrganizationLocalServiceUtil"))
    #set($organization = $os.getOrganization($themeDisplay.getScopeGroup().getOrganizationId()))
    $organization.getName()
    

    EDIT:

    If your user is member of organization(s) than you can use

    #foreach($org in $themeDisplay.getUser().getOrganizations())
        $org.getName()<br>
    #end
    

    Take note that user can be member of multiple organizations and you will get all of them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While installing Papyrus 0.9.0M6 to Eclipse Juno through the downloaded .Zip file, Juno says,
Installing egit on indigo im given following options : I've just checked 'Eclipse Egit'
When installing Windows services there are two options for automatically starting a Windows service
After installing gcc and mpich library in my linux I can compile my codes
When installing git for windows, a user is asked to select from following 3
After installing Dreamweaver CS6, the syntax highlighting of razor in visual studio 2010 removed
When installing Windows SDK v6.1, following the chromium instructions ( http://dev.chromium.org/developers/how-tos/build-instructions-windows ) I run
After installing SP1 for Visual Studio 2008, various fields are frozen e.g. in Find
After installing and configuring cluetip, i realized that the urls you hover over to
After installing rails3, I'm experiencing problems when trying to use haml with it. I

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.