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...Skins, Themes, ...Skins, Themes, ...User Roles in skinsUser Roles in skins
Previous
 
Next
New Post
12/4/2006 10:39 AM
 
I want to display a link in my skin, but only if the user is logged in as an admin or host.  What's the best way to do this inside of the skin file?
 
New Post
12/4/2006 2:21 PM
 
Use the links module and disable the view permissions for all users but admin
Or read this post (but this will only give you the possiblity to hide the link for non admin users)
 
New Post
12/4/2006 2:38 PM
 

To show content for an admin or superuser only, you can put this directly in your skin:

<% If DotNetNuke.Security.PortalSecurity.IsInRoles(PortalSettings.AdministratorRoleName) %>
             Admin only content here
<% End If %>


DotNetNuke Modules from Snapsis.com
 
New Post
6/5/2007 10:09 PM
 

Hi John. Can you tell me if it is possible to only have the control panel visible by host and admin? I'm having a problem where when I give a user in a "manager" role edit page permissions (which is required for me to edit products in Catalook the way I want) the control panel is showing up. I've tried a few variations of your code and another one I found in this forum but they didn't work for me in this particular situation.

BTW, the code above works great for adjusting absolutely positioned elements in a page on login as admin. I use it to make room for the control panel dynamically in my CSS based skins (and hybrid skins). Otherwise the skin and the control panel mash together making quite an ugly scene.

Nice tip!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...User Roles in skinsUser Roles in skins


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