组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Milan Kostoláni
Disabling page in navigation?
2013年1月23日 上午5:04
答复

Milan Kostoláni

等级: Junior Member

帖子: 92

加入日期: 2012年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.
匿名
RE: Disabling page in navigation?
2013年1月23日 上午9:47
答复

匿名

Can't you just set the page to hidden?
Gaurav Jain
RE: Disabling page in navigation?
2013年1月23日 上午11:04
答复

Gaurav Jain

等级: Regular Member

帖子: 141

加入日期: 2011年1月31日

最近的帖子

Indeed.
Liferay default navigation system (build via navigation.vm from theme) does not show hidden pages.
Milan Kostoláni
RE: Disabling page in navigation?
2013年1月24日 上午1:28
答复

Milan Kostoláni

等级: Junior Member

帖子: 92

加入日期: 2012年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
RE: Disabling page in navigation?
2013年1月25日 上午2:47
答复

Adolfo Benitez Sanchez

等级: New Member

帖子: 12

加入日期: 2008年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
RE: Disabling page in navigation?
2013年1月25日 上午5:48
答复

Rahul Sharma

等级: Junior Member

帖子: 60

加入日期: 2012年1月10日

最近的帖子

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?
2013年1月28日 上午6:08
答复

Milan Kostoláni

等级: Junior Member

帖子: 92

加入日期: 2012年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.