Search code examples
asp.netdotnetnuke

In DNN how to disable a parent menu link for the NON HOST, NON admin?


In one of my DNN web site i am using DNN menu, for some item in DNN menu i want the parent or root menu item to be accessible by HOST user, or admin user and want child elements to be accessible all users so how can i disable all root menu item to be enabled for the host/admin only(it should be click-able and should redirect to appropriate link) while the sub menu item for the root item should be enabled for all users. I am in dire need of solution please help me with this.


Solution

  • It's a strange setup that you want with this.

    To disable a parent menu link, you just set the page properties to 'disabled'. This makes a page not clickable in the menu.

    However, if for some reason you want admins to be able to click a menu item, but no other users, then I would suggest that you set up the parent menu item as normal, but then set that page to have a permanent redirect to a different page, with the second page hidden. The second page would then have the permissions set to only be visible by admin/host users.

    So...

    parent : enabled, visible, all users permission, permanent redirect to 'fake parent' child page 1 : as normal child page 2 : as normal child page n : as normal, etc

    somewhere else in the menu. fake parent : hidden page, admin only permission

    It would be a bit clunky but probably will work OK.