Fórum

How to set this configuration up?

thumbnail
Alex Weirig, modificado 14 Anos atrás.

How to set this configuration up?

Junior Member Postagens: 36 Data de Entrada: 13/07/09 Postagens Recentes
Hello,

I'm about to setup Liferay for a school network with 19 schools. I thought about creating 1 community and one Main Organisation with 19 sub-organisations.
  • Each school should have a public page. But several sub-pages, one for each school building setting up the school "campus".
  • There would be no private pages and no user pages at all.
  • People and groups would be managed in an LDAP system.
  • Strangers are not allowed to create accounts on the system, only people from the LDAP can sign-in.
  • Everybody would be part of the same community.
  • No other communities should be created


This is what I would like to see as end result:
  • the "guests" should see ALL the pages (from all sub-organisations) but some portlets on different pages would be hidden
  • authenticated users would see all the pages (from all sub-organisations) and some portlets based on their roles
  • authenticated users should be able to provide content (e.g. asset publisher) for the schools they belong to (based on roles) but not for other schools
  • authenticated users should see one additional page which would be the same for every authenticated user whatever (sub-)organisation she/he belongs to
  • authenticated users should be able to add "documents" to the DMS for their (sub-)organisation only


The problem I'm currently facing is: How can I build the navigation menu to show all the pages of all sub-organisations. This is how I thought the menu should look like:

Welcome ........... Schools ...........

Under schools should appear 1 page per sub-organisation i.e. one page for each school.

How can I change the way the navigation menu is build in order to retrieve all the public pages (1 per sub-organisation) from all sub-organisations and build the Schools menu entry?

Many thanks in advance for your precious help.

Alex Weirig
thumbnail
Amos Fong, modificado 14 Anos atrás.

RE: How to set this configuration up?

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
Hi Alex,

This sounds doable with Liferay.

The problem I'm currently facing is: How can I build the navigation menu to show all the pages of all sub-organisations. This is how I thought the menu should look like:


I'm not too clear about what you're trying to do. Do you mean have all 19 schools in one dropdown menu?

One way I can think of to do this would be to do something like the Jedi Theme. It lists all child pages of the top page in a drop down menu. Then you can add all 19 pages in drop down menu as type URL and link to each school.

If you wanted to do it programmatically, you'll probably to need to edit the theme and use velocity to find each school.
thumbnail
Alex Weirig, modificado 14 Anos atrás.

RE: How to set this configuration up?

Junior Member Postagens: 36 Data de Entrada: 13/07/09 Postagens Recentes
Hi Amos,

thank you for your reply, you're absolutely right, I want to show all 19 schools in one dropdown menu.

I'm currently running 5.2.3 and I have set up a single community with all the pages I need and created a tree for the school pages. Indeed, the theme is correctly showing the pages in the dropdown and it is exactly what I'm looking for.

Unfortunately, having only 1 community makes it hard to control the access rights for the users. If I want someone to edit content for a certain school, with 1 community the same person can also edit content for a different school, what I don't want to happen. Also, all †

I have setup an ext environment to customize Liferay to my needs. And I have tried different approaches:
1) setup 1 community per school
2) setup 1 organisation "Schools" and 1 sub-organisation per school

The problem I'm facing is that when in "guest" mode I don't know how to find all the pages available for all the communities or (sub-)organisations. I know how and where to change the building of the navigation menu (navigation.vm) and also figured out how the Velocity variables are loaded in the back-end.
But I'm missing information about the API to use to get the list of all communities/organisations and then the list of all pages for each community/organisation.

Other than that, I think this could be a piece of cake to achieve.

Alex
thumbnail
Amos Fong, modificado 14 Anos atrás.

RE: How to set this configuration up?

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
Hey Alex,

You can use this API:

	public List<organization> search(
			long companyId, long parentOrganizationId, String name, String type,
			String street, String city, String zip,
			Long regionId, Long countryId,
			LinkedHashMap<string, object> params, boolean andOperator,
			int start, int end)</string,></organization>


So it can look like this to get all organizations:

OrganizationLocalServiceUtil.search(user.getCompanyId(),
		OrganizationConstants.ANY_PARENT_ORGANIZATION_ID, null,	null,
		null, null, null, -1, -1);


perhaps you can use type or something to differentiate which ones you want.

Then to get the list of pages (layouts):

LayoutLocalServiceUtil.getLayouts(organization.getGroupId());
thumbnail
Alex Weirig, modificado 14 Anos atrás.

RE: How to set this configuration up?

Junior Member Postagens: 36 Data de Entrada: 13/07/09 Postagens Recentes
Hi Amos,

thanks for your reply and the hint on the APIs. This is very helpful.

I'll look into this and see how I can use it to get the navigation menu created the way I'd like to.

Regards,

Alex