Hi,
I've used this before on a template that had multiple places that needed this.
Place the following code to make the boolean available:
<script runat="server">
protected bool IsCmsDesk() {
return !Equals(CMSContext.ViewMode, CMS.PortalEngine.ViewModeEnum.LiveSite)
&& !Equals(CMSContext.ViewMode, CMS.PortalEngine.ViewModeEnum.Preview);
}
</script>
In your template you can use the following:
<% if(IsCmsDesk()) { %>
some html...
<% } %>
Greets,
David