Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Milan Kostoláni
Disabling page in navigation?
23 de enero de 2013 5:04
Respuesta

Milan Kostoláni

Ranking: Junior Member

Mensajes: 92

Fecha de incorporación: 26 de julio de 2012

Mensajes recientes

Hello everyone,

I want to know if its possible to make a certain page not visible in navigation.

Here is a scenario: We have a 1 page with few private pages(lets say 4) and we have 2 organizations which have access to this Site including private pages. And what we what is that in navigation we will have for no1 org 3 pages and for no2 org we will have 3 pages ( excluding one from one the no1 org and including one other page that is not visible for no1)

What I tried : go to site pages - private pages - chosed page and set permission for a role - view uncheck === result, nothing happened

I have checked navigation.vm file, but I have no idea what to change there.

I also know about the option for JSP to check users organization and by that disable visibility for portlet however how to do that for .vm file?


Help is appriciated.
Anónimo
RE: Disabling page in navigation?
23 de enero de 2013 9:47
Respuesta

Anónimo

Can't you just set the page to hidden?
Gaurav Jain
RE: Disabling page in navigation?
23 de enero de 2013 11:04
Respuesta

Gaurav Jain

Ranking: Regular Member

Mensajes: 141

Fecha de incorporación: 31 de enero de 2011

Mensajes recientes

Indeed.
Liferay default navigation system (build via navigation.vm from theme) does not show hidden pages.
Milan Kostoláni
RE: Disabling page in navigation?
24 de enero de 2013 1:28
Respuesta

Milan Kostoláni

Ranking: Junior Member

Mensajes: 92

Fecha de incorporación: 26 de julio de 2012

Mensajes recientes

Ye, that is simple, but wrong.

Because then neither of organizations will see the pages.

I think this will help to understand why not.

Required: Pages- Home //// Sell //// Use
Visibility- Both //// No1 //// No2

with hidden: Visibility- Both ////none ////none
Adolfo Benitez Sanchez
RE: Disabling page in navigation?
25 de enero de 2013 2:47
Respuesta

Adolfo Benitez Sanchez

Ranking: New Member

Mensajes: 12

Fecha de incorporación: 24 de septiembre de 2008

Mensajes recientes

You can do it with roles, disable "view" permission for everyone except the role you want in the page.

It should works, but you can do it for the first page in the group
Rahul Sharma
RE: Disabling page in navigation?
25 de enero de 2013 5:48
Respuesta

Rahul Sharma

Ranking: Junior Member

Mensajes: 60

Fecha de incorporación: 10 de enero de 2012

Mensajes recientes

Hi Milan,

You are moving in right direction if you are tryinig with the vm file,since we have the navigation.vm file in which you just have to add the code below the iteration which is for the pages display, whose variable is "$nav_item".The code will detect which community it is running under and then sets "style=display:none" for the pages which you dont want to show to the community viewers.

Hope that helps!
Milan Kostoláni
RE: Disabling page in navigation?
28 de enero de 2013 6:08
Respuesta

Milan Kostoláni

Ranking: Junior Member

Mensajes: 92

Fecha de incorporación: 26 de julio de 2012

Mensajes recientes

In conclusion,

I made it in navigation.vm with $nav_item.getName().equals("SomeName") - the name of the page
and $theme_display.getUser().getOrganizations().get(0).getName().equals("SomeOrganization")

just added those in if cycles and its done.

But thanks for help anyway.