Quick Nav:  Online Store   |   Login | Register

Menu by role

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
Speester
<20 Posts
Posts:5


07/09/2007 8:50 AM  

I am trying to use Nav Menu by levels and roles. I have the following structure in DNN including the Roles

 

Home

Home > Products

Home > Products > Power Units (Everyone)

Home > Products > Manul Units (Builders)

Home > Products > Components (Trade)

 

I have the following code in the acsx file

 

<

td>

 

<divid="ParentTabsContainer">

 

<Snapsis:NavMenuid="ParentTabs1"Level="2-0"Recurse="False"Type="Tabs"ExcludeTabs="Admin,Host"runat="server"/><Snapsis:NavMenuid="AdminHostList"Level="0"Type="SelectList"IncludeTabs="Admin,Host"runat="server"/>

 

div>

 

 

 

When I goto view the products page I can see all products sub menu items being displayed regardless of the role.

 

I am doing a funny kind of redirect where when a certain menu item is clicked the qhole page is re-directed to another website and then they host an iFrame which points back to our new skin. All the re-directs work but the skin shows all the menu items when you should only see

 

Power Units and Manual Units (if you are a builder) or

Power Units and Components  (if you are a trade user)

 

Why are all the menu items being shown even if the page is redirected?

 

I have put all the pages in the respective roles.

 

Thanks

 

td>

John Mitchell
Posts:3478


07/09/2007 3:20 PM  
Hi Speedster,
If I am understanding you correctly then you are trying to show menu items by role, but you are doing it with an iframe on another site.
That may work if the same authentication cookie is still used, but I'm not sure.

The one thing I do notice that may be a problem is that the level="2-0" that should acutally be Level="0-2" low level - high level.

I've never tried switching them around, but that may be the problem because I do comparisons to see if the tab level is in between the range from low to high.
Speester
<20 Posts
Posts:5


07/11/2007 10:32 AM  

Hi,

If i walk through as customer it may be clearer,

The customer logs on to DNN (he is in the trade role)

The customer presses a menu item which redirects them to another website and within the new website there is an iFrame which points back to a page on our server. The iFrame page is a header skin which contains the navmenu.

What the user sees when he logs onto this other site is a header whcih shows all the buttons

Power Units (Everyone) Manual Units (Builders) Components (Trade)

which really the user should only seen the

Power Units (Everyone) and Components (Trade)

buttons.

I have changed the

Level="2-0"

to

Level="0-2"

and it still doesn't work. I know DNN is showing the correct user information as there username is displayed. If I change the Level to 0-0 i can see the navmenu working properly, it doesn't like anything greater then 0

If you are still struggling i can send some screen shots.

Thanks

John Mitchell
Posts:3478


07/13/2007 1:34 PM  

Hi Speedster,

Sorry for the delay, i just noticed I hadn't responded to your new post.

Ok, I think I understand now.  But just to make sure, are you saying that if the navigation links are presented inside an iframe that the security for the menu items does not get applied correctly?

What happens right after you log into the original site? Before going to the other one and viewing it in an IFrame? In other words, does it work correctly when not using an iframe?

I'll test this out and post back.

John Mitchell
Posts:3478


07/13/2007 1:49 PM  

I did a test here: http://demo.snapsis.com/Iframetest/tabid/62/Default.aspx and it seems to be working correctly.

Are you using the DisplayRoles property?  I didn't use that in the test above, but it is not needed to do what you are describing.

The Display of the menu items is controlled by the security on the page.  The DisplayRoles setting on the menu will hide the whole menu if the user is not in the role.

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.



ActiveForums 3.7
Powered by: Snapsis Software