0

I want is that by default users of specific group have a default private pages. that can not be modified. So that I created below hierarchy.

Organization--School

=======================

User Group--Head of Department --private pages --set site templates as "HOD Site Templates".

Site templates--HOD Site templates--private pages: 'View Task' , 'View Application'

User: John Miller is member of user group "Head Of Department".

=======================

User Group--Department--private pages--set site templates as "Department Site templates"

Site Templates--Department Site Templates--private pages:'View Task'

User: Daryl is a member of user group "Department"

=======================

The Problem is that when lets say "John Miller is member of group "Head Of Department" & "Department". Then When user John Miller logged in at that time its default private pages is "1.View Task 2.View Application 3.View Task"

I want is that if same page occurs then it combines to 1 page in our case it should combine to 1.View Task.

So when john miller logged in then in private pages it should display only "1.View Task 2.View Application"

Basically idea is that define default private pages on group and allocate to user but when multiple group assign to particular user the private pages of that user is duplication due to above issue. Note: I read couple of article Like

  1. https://www.liferay.com/community/wiki/-/wiki/Main/How+To+Use+User+Group+Page+Templates

2.https://books.google.co.in/books?id=iaZAGqKTeRYC&pg=PA107&lpg=PA107&dq=liferay+Composing+a+user+page+by+combining+pages+from+different+user+groups&source=bl&ots=1ukfp_xsTl&sig=agQzNBb89oHYSiX0Bf3SEn6NIGc&hl=en&sa=X&ei=6K5uVaWhL8eHuASWo4GQDw&ved=0CC4Q6AEwAw#v=onepage&q=liferay%20Composing%20a%20user%20page%20by%20combining%20pages%20from%20different%20user%20groups&f=false

But I can't succeed yet.

ekad
  • 14,436
  • 26
  • 44
  • 46

1 Answers1

0

If a user is part of multiple user groups like "John Miller", then just write a hook to navigate user to specific user group private pages i.e either to "Head Of Department" or "Department".

Settings given by liferay is for creating user group, adding private pages, assigning group members etc. But for redirection you have to take care of default.landing.page property of liferay. So, you can directly navigate user by writing hook.

response.sendRedirect("User group private pages");

Default private pages still be all 3 pages, since you have added user to them. If you are try to add them to 2 user group templates and expecting to display only one then it is not sensible. What is the requirement to do this?

Neeraj Gautam
  • 164
  • 2
  • 11
  • Neeraj Thanks For you help , Actually thats not what i m looking for. Lets's say John miller is a member of "Department group" and "Head of department group" So when he logges in he wil see default private pages of "department" and "head of department group" Department -- Private pages=view task, Head of department -- Private pages=View Task, View Application So in both of them one page is common so no need to display duplicate pages when it logges in So, When any new member joins that group at that time when he logges in it by default see default private pages of that site. – user3595542 Jun 05 '15 at 05:43
  • "So in both of them one page is common so no need to display duplicate pages when it logges in" - why no need to show common page. You have created same page name in 2 different sites. And if user is part of both site then he will see that common page. That's why I asked you what is the requirement basically? – Neeraj Gautam Jun 10 '15 at 17:00
  • Neeraj I understand your concern but i am trying to tell same thing about requirement it would be great if you please go through above link . – user3595542 Jun 12 '15 at 05:28
  • Link: https://books.google.co.in/books?id=iaZAGqKTeRYC&pg=PA107&lpg=PA107&dq=liferay+Composing+a+user+page+by+combining+pages+from+different+user+groups&source=bl&ots=1ukfp_xsTl&sig=agQzNBb89oHYSiX0Bf3SEn6NIGc&hl=en&sa=X&ei=6K5uVaWhL8eHuASWo4GQDw&ved=0CC4Q6AEwAw#v=onepage&q=liferay%20Composing%20a%20user%20page%20by%20combining%20pages%20from%20different%20user%20groups&f=false Above link refer : "Composing page out of severeal user group" Link: https://www.liferay.com/community/wiki/-/wiki/Main/How+To+Use+User+Group+Page+Templates Refer: "Page Composition through several user group" – user3595542 Jun 12 '15 at 05:29