liferay user group default site template private pages

422 views Asked by At

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.

1

There are 1 answers

4
Neeraj Gautam On

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?