Foren

Navigation show all pages regardless of permissions

Clement P, geändert vor 11 Jahren.

Navigation show all pages regardless of permissions

New Member Beiträge: 8 Beitrittsdatum: 18.06.12 Neueste Beiträge
Hi everyone.

I am looking for a way to customize the navigation menu to show all pages (pages' icons i mean), regardless of the user's permissions.

Can I do this ? and where ? Cause when i loop through nav_items, I only got pages that matches user's permissions...

Thanks.
thumbnail
David H Nebinger, geändert vor 11 Jahren.

RE: Navigation show all pages regardless of permissions

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
This is a function provided by an integral part of the Liferay core, and you'll have to make some pretty deep changes in order to expose the information...

Basically it's controlled by the com.liferay.portal.theme.NavItem class in conjunction with the com.liferay.portal.template.TemplateContextHelper class.
Clement P, geändert vor 11 Jahren.

RE: Navigation show all pages regardless of permissions (Antwort)

New Member Beiträge: 8 Beitrittsdatum: 18.06.12 Neueste Beiträge
Found it !
$nav_items only shows visible pages (the ones you have the permission to see).
But LayoutLocalService shows all of them, even the hidden ones.

Here's the code :
#set($layoutLocalService = $serviceLocator.findService("com.liferay.portal.service.LayoutLocalService"))
#set($topPublicLayouts = $layoutLocalService.getLayouts($layout.getGroupId(),false))
		
#foreach($layout_page in $topPublicLayouts)
serena tagliabue, geändert vor 11 Jahren.

RE: Navigation show all pages regardless of permissions

New Member Beitrag: 1 Beitrittsdatum: 24.05.12 Neueste Beiträge
Hi Clement.
can you provide navigation.vm file, please?
I'm experiencing the problem mentioned here: http://www.liferay.com/community/forums/-/message_boards/message/14618383

thanks a lot


Serena