Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Hiding Page Elements when viewing in CMSDesk View modes: 
User avatar
Certified Developer 8
Certified Developer 8
Nick Shepherd - 12/15/2011 3:54:24 PM
   
Hiding Page Elements when viewing in CMSDesk
I've been using the Twitter Bootstrap styles for prototyping and building out functionality in Kentico prior to applying client styles to them. This helps to flesh out functionality without getting lost in the nitty gritty.

One of the issues I've come across however is when I include the stylesheet it destroyed the editable Portal interface. I was wondering if there is a way to disable the view state (possibly using K#) when in the Design view within CMS Desk?

I looked a bit through the exposed API stuff in the macro engine but didn't see anything that popped out.

Thanks in advance!

User avatar
Certified Developer 8
Certified Developer 8
Nick Shepherd - 12/15/2011 4:03:40 PM
   
RE:Hiding Page Elements when viewing in CMSDesk
I worded this a bit wrong I don't want to disable the VIEWSTATE but rather the visibility of the web part.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 12/16/2011 7:08:07 AM
   
RE:Hiding Page Elements when viewing in CMSDesk
Hello,

You can use the following K# expression in the Visible property of your web part:

{% if(Cookies.viewmode == 0) {return true;} else {return false;} %}

The viewmode is 0 only on the live site.

Best regards,
Boris Pocatko

User avatar
Certified Developer 8
Certified Developer 8
sparker-pmc - 1/18/2013 1:47:08 PM
   
RE:Hiding Page Elements when viewing in CMSDesk
FYI, In version 7 this changed a little bit

{% if(Cookies.cmsviewmode == 0) {return true;} else {return false;} %}