Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Milan Kostoláni
Disabling page in navigation?
23 gennaio 2013 5.04
Risposta

Milan Kostoláni

Punteggio: Junior Member

Messaggi: 92

Data di Iscrizione: 26 luglio 2012

Messaggi recenti

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.
Anonimo
RE: Disabling page in navigation?
23 gennaio 2013 9.47
Risposta

Anonimo

Can't you just set the page to hidden?
Gaurav Jain
RE: Disabling page in navigation?
23 gennaio 2013 11.04
Risposta

Gaurav Jain

Punteggio: Regular Member

Messaggi: 141

Data di Iscrizione: 31 gennaio 2011

Messaggi recenti

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 gennaio 2013 1.28
Risposta

Milan Kostoláni

Punteggio: Junior Member

Messaggi: 92

Data di Iscrizione: 26 luglio 2012

Messaggi recenti

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 gennaio 2013 2.47
Risposta

Adolfo Benitez Sanchez

Punteggio: New Member

Messaggi: 12

Data di Iscrizione: 24 settembre 2008

Messaggi recenti

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 gennaio 2013 5.48
Risposta

Rahul Sharma

Punteggio: Junior Member

Messaggi: 60

Data di Iscrizione: 10 gennaio 2012

Messaggi recenti

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 gennaio 2013 6.08
Risposta

Milan Kostoláni

Punteggio: Junior Member

Messaggi: 92

Data di Iscrizione: 26 luglio 2012

Messaggi recenti

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.