Return to Snippet

Revision: 50046
at August 5, 2011 01:34 by inreflection7


Updated Code
// Put this line in your <head> of the master page

<link rel="Stylesheet" href="~/App_Atom/Admin/css/admin.css" runat="server" id="CMS_CSS" visible="false" />

// Put this in the Master CS file

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.CMSHelper;
using CMS.UIControls;
using CMS.PortalEngine;

public partial class App_Atom_MasterPages_Default : TemplateMasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
		 CheckForEditMode();
    }
		// If in Kentico Edit Mode
	private void CheckForEditMode()
	{
		if (CMSContext.ViewMode.Equals(ViewModeEnum.Edit))
		//Load Custom Admin CSS
			//linkCmsCss.Visible = true;
			CMS_CSS.Visible = true;
	}
	
}

Revision: 50045
at August 5, 2011 01:30 by inreflection7


Initial Code
<%-- Put this line in your <head> of the master page --%>

<link rel="Stylesheet" href="~/App_Atom/Admin/css/admin.css" runat="server" id="CMS_CSS" visible="false" />

<%-- Put this in the Master CS file --%>

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.CMSHelper;
using CMS.UIControls;
using CMS.PortalEngine;

public partial class App_Atom_MasterPages_Default : TemplateMasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
		 CheckForEditMode();
    }
		// If in Kentico Edit Mode
	private void CheckForEditMode()
	{
		if (CMSContext.ViewMode.Equals(ViewModeEnum.Edit))
		//Load Custom Admin CSS
			//linkCmsCss.Visible = true;
			CMS_CSS.Visible = true;
	}
	
}

Initial URL


Initial Description
Sometimes things look terrible in CMSDesk. With just a few adjustments to the master page and its CS file you can target elements in an admin.css page.

Initial Title
Kentic - CMSDesk CSS

Initial Tags
css

Initial Language
C#