Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Configure It! (...  Get Mode in Skin
Previous Previous
 
Next Next
New Post 7/2/2008 3:53 AM
Resolved
User is offline freeborough
5 posts
10th Ranked


Get Mode in Skin 

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 8:30 PM
Accepted Answer 
User is offline Will Strohl
1331 posts
Orlando.DotNetNukeUG.Net/
6th Ranked




Re: Get Mode in Skin 

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 LinkedIn profile
StrohlSiteDesign.com | My Blog | DotNetNuke® Skins by SSD
Google Toolbar Button for DNN | Suggested DNN Upgrade Paths
ODUG Web Site
 
New Post 7/3/2008 1:50 AM
User is offline freeborough
5 posts
10th Ranked


Re: Get Mode in Skin 

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 5:18 AM
User is offline Will Strohl
1331 posts
Orlando.DotNetNukeUG.Net/
6th Ranked




Re: Get Mode in Skin 

I am glad to help.


Will LinkedIn profile
StrohlSiteDesign.com | My Blog | DotNetNuke® Skins by SSD
Google Toolbar Button for DNN | Suggested DNN Upgrade Paths
ODUG Web Site
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  Get Mode in Skin
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


ADefWebserver.com
DotNetNuke® Module Development Help Website
ADefWebserver.com
Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com
DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP