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 ...Role based banner changeRole based banner change
Previous
 
Next
New Post
11/7/2009 5:58 PM
 

What I am looking to do I know isn't in these forums, I have looked and looked and had no luck. What I am trying to do is make my website's banner change when the user is placed under a specific role I have set up. For instance I have a role called "UserSkin" so everyone who is not in that role will see one banner where as everyone who is in that role will see another, however the script I created for it shows the banner I created for "UserSkin" while I am logged in as a super user... I have tried making the script something like:

<% If UserController.GetCurrentUserInfo().IsInRole("UserSkin") %>
<img src="<%= SkinPath %>kbiglogofullold.png">
<% else %>
<img src="<%= SkinPath %>kbiglogofullnew.png">
<% end if %>

and I have tried every single version using "DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo().IsSuperUser" as possible and still can not quite get it to work properly.

How can I make this code so that SuperUsers as well as all the rest of the users see the new banner while the only role that should see the old banner is the UserSkin role?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Role based banner changeRole based banner change


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