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, ...Change skin layout for certain usersChange skin layout for certain users
Previous
 
Next
New Post
11/25/2006 1:32 PM
 
I just found a solution for a problem i have had with a lot of skins.
I guess others have done this before, but I didn't find anything (and there might be a better solution)
Hope this will help somebody....

You have a skin (mostly with absolute positioning) that looks great.
Until you login, then everything starts to move because of the containers showing up and for some panes there is just not enough space. Some will even overlap.

The solutiuon I found:

Put a div around your current skin, and give it a class name of the current user.

<div class="<%=DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo.UserName%>">
    <Your Skin>
</div>

Now you can create some specific CSS if the Admin user logs in:

.mydiv /*-- for all the other users*/
    {
    width:100px;
    height:100px;
    }

.admin .mydiv /*-- for the admin user*/
    {
    width:150px;
    height:200px;
    }

Added march 10 - 2007
related blog
Related Post
 
New Post
11/25/2006 1:41 PM
 

that is a very nice trick.

thanks!

Peter


Peter Schotman
Cestus Websites voor DotNetNuke oplossingen in Nederland
Contact us for your custom design and skinning work.
 
New Post
11/25/2006 6:11 PM
 

This is definitely cool for changing things for other roles.. but for the admin account, wouldn't you normally just specify an Admin skin and/or container? That's pretty much what that function is for.

Rob

 
New Post
11/26/2006 3:38 AM
 
You are right, but for some sites I use 10 different skins.
This means you would have to create 10 admin skins and the user has to change two skins instead of one.
And if the design somehow changes I have to change both..
Now it's just part of the skin and changes if the Admin logs in.

I think in some situations this is easier. (or I'm lazy)
 
New Post
11/26/2006 5:16 AM
 
Rob

I forgot to mention:
Another thing is that the admin skin is only used for admin pages.
The normal pages are displayed using the aplied skin even if you are logged in as admin / host.
Only the admin pages are displayed with the admin skin (if you are editing a text for instance).

By the way if somebody uses this it might be nice to add some style for the host too.

.admin .mydiv, .host .mydiv
    {
    width:150px;
    height:200px;
    }

A nice enhancement for DNN would be to add a class to the body tag of DNN with the currently logged in username...
I'm stil looking for a way to change the skin for a certain user group....
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Change skin layout for certain usersChange skin layout for certain users


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