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 ...Get Mode in SkinGet Mode in Skin
Previous
 
Next
New Post
7/2/2008 6:53 AM
 

How can I get the mode when I'm in a skin?  i.e. View / Edit / Design.   I want to change the skin depending on which is currently being used.

Also, is the mode available in the style somewhere?  I have my own container skin that shows a white block below it when in view mode - this is where the 'Edit Text' and 'Settings' buttons would be in Edit mode.  Being able to style according to the mode would be useful - but I can't see any way to hide this only in View mode.

Thanks in advance,

- Andy.

 
New Post
7/2/2008 11:30 PM
Accepted Answer 

I first must say that I am not entirely clear why you want to do this but...

You will need to utilize the User Control method of skinning, and not HTML to do this.  Here are the methods you can use to detect the current view:

Dim blnIsLayoutMode As Boolean = DotNetNuke.Common.Globals.IsLayoutMode
Dim blnIsEditMode As Boolean = Me.IsEditable
' assume that View mode also includes when you are not logged in
Dim blnIsViewMode As Boolean = (Not blnIsLayoutMode And Not blnIsEditMode)

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
7/3/2008 4:50 AM
 

Excellent, that's exactly what I was looking for.  Thanks.

The reason I need this is to allow for styling differently based on the mode.  If you have your own container skins, you need to have a module header (for the drop-down menu, module title) and a module footer (for the 'Edit Text' and 'Settings' buttons).  These are required for the administration, but not for the public viewer of the site.

However, the containers for these (table rows in the default container skins) are left in place when viewing the site as a public user.  Although they're empty, they still leave blank lines where I don't want them.  There is a 1px blank line for the header, and a full text-line-height blank line below the module - which I can't have in the skin I'm implementing.

Having a class set in the skin that identifies the mode will allow me to correct this in the style sheet really easily.  So, thanks a lot for this!

 
New Post
7/3/2008 8:18 AM
 

I am glad to help.


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
9/16/2010 4:55 AM
 
In DNN 542, the Me.IsEditable property in the skin does not exist. Use DotNetNuke.Common.Globals.IsEditMode which is its equivalent.


Paul Taylor
Dotcom Software Solutions Ltd
DotNetNuke, ASP.NET and SQL Server Development
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Get Mode in SkinGet Mode in Skin


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