Different Class Names for the Column Layout

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
12/28/2012 2:20:30 PM
Gravatar
Total Posts 199

Different Class Names for the Column Layout

I am using the consolidated CSS approach and I need to have different class names for my home skin because I want to do some custom rendering.

every time the home page renders it does not render custom classes.  the center renders like this:

<div id="ctl00_divCenter" class="art-layout-cell art-content center-rightmargin cmszone">
 

I must be missing something as I have followed the article and did all of the following below.

Any suggestions would be appreciated, thanks.

 

----------------------------------------------------------

I have these panels set in my layout.master

<asp:Panel id="divLeft" runat="server" visible="True" SkinID="pnlPlain"></asp:Panel>


<asp:Panel id="divCenter" runat="server" visible="True"  SkinID="pnlPlain">
<portal:Breadcrumbs id="Breadcrumbs" runat="server"></portal:Breadcrumbs>
<portal:ChildPageMenu id="ChildPageMenu" runat="server" CssClass="txtnormal"></portal:ChildPageMenu>
<asp:ContentPlaceHolder ID="mainContent" runat="server"></asp:ContentPlaceHolder>
</asp:Panel>


<asp:Panel id="divRight" runat="server" visible="True" SkinID="pnlPlain">
<asp:contentplaceholder ID="rightContent" runat="server"></asp:contentplaceholder>
</asp:Panel>

-------------------------------------------------------

I have this just above the from element:

<portal:LayoutDisplaySettings ID="LayoutDisplaySettings1" runat="server" />  
---------------------------------------------------------

I have this in my theme.skin

<portal:LayoutDisplaySettings runat="server"
LeftSideNoRightSideCss="leftside"
RightSideNoLeftSideCss="rightside-home"
CenterNoLeftSideCss="center-leftmargin"
CenterNoRightSideCss="center-rightmargin-home"
CenterNoLeftOrRightSideCss="center-nomargins"
CenterWithLeftAndRightSideCss="center-rightandleftmargins"
/>
 

12/28/2012 2:53:42 PM
Gravatar
Total Posts 18439

Re: Different Class Names for the Column Layout

You need to replace those <asp:Panel with <portal:LayoutPanel but keep the ids (divLeft, divCenter, divRight) the same as discussed in the article Layout Display Settings

Hope that helps,

Joe

12/28/2012 3:57:00 PM
Gravatar
Total Posts 199

Re: Different Class Names for the Column Layout

thanks Joe, I updated the panels, re-published the master and theme.skin then touched the web.config cleared my browser history/cache.  The custom classes seem to not be rendering.

is there anything else that may be stopping the class rendering?  possible my layout.master is too old and missing something?

possibly:

<asp:SiteMapDataSource ID="SiteMapData" runat="server" ShowStartingNode="false" />
<asp:SiteMapDataSource ID="PageMapDataSource" runat="server" ShowStartingNode="false" />
<asp:SiteMapDataSource ID="ChildPageSiteMapData" runat="server" ShowStartingNode="false" />
<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />

 

12/29/2012 7:33:34 AM
Gravatar
Total Posts 18439

Re: Different Class Names for the Column Layout

All that is required is the layoutpanels and the LayoutDisplaySettings and theme.skin configuration to specify the classes.

However if you are using .NET 3.5 in medium trust it cannot load the theme.skin from the skin folder so you would have to copy theme.skin into /App_Themes/Default folder

12/31/2012 10:14:20 AM
Gravatar
Total Posts 199

Re: Different Class Names for the Column Layout

Joe, thank you for all your help so far- I found somethikng strange and wanted to let you know if this might be something you know of.

When I disable this setting (Allow Setting Skin for Page?) and set my home skin for the entire site the custom CSS renders fine.

If I enable that setting and set my home skin for only the home page the custom css classes does not render on the home page? 

It seems as if I can only render custom css if I have only one skin.

 

12/31/2012 10:46:01 AM
Gravatar
Total Posts 199

Re: Different Class Names for the Column Layout

I figured it out - not sure why, but I needed to update my internal skin to also use custom css classes and made my theme.skin different from the home theme.skin.

I guess when you go custom all skins have to be custom and feed from the them.skin.

This might be an isolated incident, but you may want to update the "Layout Display Settings" article to note if you are using an older version of the master and multiple skins you should update all skins to the new layout.

thanks as always.

You must sign in to post in the forums. This thread is closed to new posts.