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, ...conditional rendering of container skinsconditional rendering of container skins
Previous
 
Next
New Post
2/12/2007 12:36 AM
 
Hello ...

In my current project (my first dnn) i was trying to have quite a slick design. So the containers dont use the print or syndicate facilities when rendered to the public. However i think this is quite good design to have the bottom hr ruler and of course the actionbuttons when you are in admin mode. So im thinking is there anyway to have conditional rendering of the container skin. I would like to skip the hr at the bottom and the full actionbutton table, when rendering the skin to the public.

Is this possible, or do i have to make two different container skins, one for admin and one for public rendering?

Regards
christopher
 
New Post
2/14/2007 6:01 PM
 
Yes and no..
You can apply a different container to the admin pages of the site.
But this will only be used if you are on one of the admin pages.
There are some possibilities to change the skin automatically, but you would have to add some VB code to your ascx file.
 
New Post
2/17/2007 2:40 AM
 
thanks Timo .. I think I will will separate the admin and public skin.

//christopher
 
New Post
3/10/2007 6:52 AM
 
Hello Timo ..

I totally misunderstood the meaning of the admin skin and public skin.. but you learn something new every day! ... So what i want to do is using one container with conditional rendering in it. So i found the following that seems to be commonly used

if DotNetNuke.Security.PortalSecurity.IsInRoles(PortalSettings.AdministratorRoleName) then
end if

But i have some problem with it.. the PortalSettings.AdministratorRoleName is not working and the ide says "Reference to a non-shared member requires an object reference" .. so when i try to use this, my container just reverts to the standard blue container.

So i wonder, is my setup is faulty or are there any other changes. I can reach the property by doing (new Portalsettings).AdministratorRoleName .. but then of course the class is empty..


One more question, is there any commonly used log files that dnn used to log errors?

Regards
Christopher
 
New Post
3/10/2007 7:12 AM
 
.. after some checking through the api i found the GetPortalSettings()

so the solution is the following, put this in top of your container

<%
Dim isAdmin As Boolean
isAdmin = DotNetNuke.Security.PortalSecurity.IsInRoles(GetPortalSettings().AdministratorRoleName)
%>

and then use the isAdmin to filter out the things u dont want..

//christopher
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...conditional rendering of container skinsconditional rendering of container 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