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, ...Changing background based on user role?Changing background based on user role?
Previous
 
Next
New Post
8/4/2010 12:14 PM
 
I have a site that I wish to change the background of *IF* a user belongs to a particular role.

Can this be done in the .ascx page for the skin?

For example, the "Default" background of bg.jpg normally loads, but when someone belonging to the "Council" role logs in, it changes the background to bg2.jpg?

Thanks in advance!
 
New Post
8/4/2010 2:39 PM
 
skins usually don't have code behind, you may use inline code and check userroles property of user object.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/4/2010 3:01 PM
 
I'm pretty sure that the following is what Sebastian just said (grin) but John Mitchell answers your question and provides example code in this thread on his forums. 

Make sure to read through the whole thread - the RoleSwitcher skin code is about 6 or 7 posts in.
 
New Post
8/4/2010 4:48 PM
 
There's an example skin here: http://dnnskinextensions.codeplex.com...
 
New Post
8/4/2010 4:51 PM
 
Mmm... that looks promising.. thank you for the links and the information. Just as a caveat, I'm running DNN5... so I have to tread lightly. :) I figured out how to make the background change based on what tab/page I'm on, but I need to un-do that and essentially have two different skins, with two different color schemes, and make them flip. I was hoping it was something simple I could do (I mean, I know how I'd do it in classic ASP... something like "If UserRole='Manager' then Response.write *a bunch of CSS stuff* else response.write *a bunch of default css stuff*" I love it when the boss says "It should be simple to just change the color if a person belonging to this group logs in...."
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Changing background based on user role?Changing background based on user role?


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