Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Collapsing menusCollapsing menus
Previous
 
Next
New Post
8/2/2011 6:30 PM
 
On my portal, I have seven pages visible to everyone, and the rest you must be logged in to see. I would like those seven pages to display individually in the menu when not logged in, but then collapse under a parent page, public site, when someone logs in, so they don't take up too much room in the menu. I figured out a hack that works reasonably well (two sets of pages, one redirecting to the other - one set under a public site parent page that's only visible to registered users, and the other at the top level of the menu system, not visible to registered users) but us poor admins still have to see both sets of pages in the menu. Is there a real way to make collapsing menus based on user logged in status? If not, is there a way to make pages not viewable by admins?
 
New Post
8/3/2011 10:06 PM
 
It's been a day, and I only got 9 views? Are these forums really that dead? It's a simple question, or was I not clear enough? I'd appreciate a reply even if it's just to say that what I want isn't possible...
 
New Post
8/3/2011 11:13 PM
 
i think perhaps the skinning forum might have been a better choice than admin - http://www.dotnetnuke.com/Resources/Forums/forumid/109/scope/threads.aspx . As to your question, it should be possible -id likely use the ddrmenu (built into 6.0) with razor templates (http://www.dotnetnuke.com/Resources/Wiki/loc/allpages/Cat/DDRMenu.aspx) as you can add code to check the user is logged in and what roles e.g. User.IsInRoles("Administrator") and render different menus.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/4/2011 4:48 PM
 
Sorry, I didn't think this question had anything to do with skins. I expected it to be part of the built-in menu system, shame it's not. Maybe something you'll consider adding in the future? :)

I'm afraid I have no idea how to add this code you speak of. Where do I put it? And I'll need a bit more than User.IsInRoles("Administrator")...what would be the full syntax to, say, display a page if a user is an administrator? I just need a full example of adding one page based on a user's roles, and I can tweak it as necessary.

Thanks for the help!
Myrkul
 
New Post
8/4/2011 5:06 PM
 
please take a look at the razor example for DDRMenu that I pointed out . As to the code, it's just using UserController - http://www.dotnetnuke.com/Resources/Wiki/Page/UserController.aspx

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Collapsing menusCollapsing menus


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out