留言板

Disabling page in navigation?

Milan Kostoláni,修改在11 年前。

Disabling page in navigation?

Junior Member 帖子: 92 加入日期: 12-7-26 最近的帖子
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.
Bradley Wood,修改在11 年前。

RE: Disabling page in navigation?

thumbnail
Gaurav Jain,修改在11 年前。

RE: Disabling page in navigation?

Regular Member 帖子: 145 加入日期: 11-1-31 最近的帖子
Indeed.
Liferay default navigation system (build via navigation.vm from theme) does not show hidden pages.
Milan Kostoláni,修改在11 年前。

RE: Disabling page in navigation?

Junior Member 帖子: 92 加入日期: 12-7-26 最近的帖子
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,修改在11 年前。

RE: Disabling page in navigation?

New Member 帖子: 12 加入日期: 08-9-24 最近的帖子
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,修改在11 年前。

RE: Disabling page in navigation?

Junior Member 帖子: 59 加入日期: 12-1-11 最近的帖子
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,修改在11 年前。

RE: Disabling page in navigation?

Junior Member 帖子: 92 加入日期: 12-7-26 最近的帖子
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.