Template: Required elements of a mojoPortal layout.Master file

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.
4/16/2008 5:54:48 AM
Gravatar
Total Posts 43

Template: Required elements of a mojoPortal layout.Master file

Hi,

Joe's documentation on Understanding the layout.Master file includes images of code snippets documenting the minimal elements in a layout.master file. I have typed this out from the image while creating a new skin, and so thought others could save time by simply copy-pasting from this post.

So here's the template for a minimal layout.master file for use when creating a new skin - again, this is from Joe's documentation.

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
        <title></title>
</head>
<body>
<form id="frmMain" runat="server">
<asp:SiteMapDataSource ID="SiteMapData" runat="server" ShowStartingNode="false"/>
<portal:LoginLink id="LoginLink" runat="server" UseLeftSeparator="True" />
<portal:LogoutLink id="LogoutLink" runat="server" UseLeftSeparator="True" />

<asp:contentplaceholder ID="pageEditContent" runat="server"></asp:contentplaceholder>

<portal:SiteMenu id="SiteMenu1" runat="server" ShowMenu="true" ShowTreeView="false"
        TopLevelOnly="false" Direction="Horizontal">
</portal:SiteMenu>

<asp:Panel id="divLeft" runat="server" cssclass="leftside" visible="True" SkinID="pnlPlain">
        <asp:contentplaceholder ID="leftContent" runat="server"></asp:contentplaceholder>
</asp:Panel>

<asp:Panel id="divCenter" runat="server" cssclass="center-rightandleftmargins" visible="True" SkinID="pnlPlain">
        <asp:contentplaceholder ID="mainContent" runat="server"></asp:contentplaceholder>
</asp:Panel>

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

</form>

</body>
</html>

 

4/16/2008 6:30:39 AM
Gravatar
Total Posts 43

Re: Template: Required elements of a mojoPortal layout.Master file

Attempting to enter "Administration -> Site Settings" using this layout.Master file caused an exception to be generated. Debugging the error it turns out that another line of code is required, a ScriptManager.

The updated miminal template is as follows:

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="frmMain" runat="server">
<asp:SiteMapDataSource ID="SiteMapData" runat="server" ShowStartingNode="false"/>
<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
<portal:LoginLink id="LoginLink" runat="server" UseLeftSeparator="True" />
<portal:LogoutLink id="LogoutLink" runat="server" UseLeftSeparator="True" />

<asp:contentplaceholder ID="pageEditContent" runat="server"></asp:contentplaceholder>

<portal:SiteMenu id="SiteMenu1" runat="server" ShowMenu="true" ShowTreeView="false"
        TopLevelOnly="false" Direction="Horizontal">
</portal:SiteMenu>

<asp:Panel id="divLeft" runat="server" cssclass="leftside" visible="True" SkinID="pnlPlain">
        <asp:contentplaceholder ID="leftContent" runat="server"></asp:contentplaceholder>
</asp:Panel>

<asp:Panel id="divCenter" runat="server" cssclass="center-rightandleftmargins" visible="True" SkinID="pnlPlain">
        <asp:contentplaceholder ID="mainContent" runat="server"></asp:contentplaceholder>
</asp:Panel>

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

</form>

</body>
</html>

 

4/16/2008 9:37:30 AM
Gravatar
Total Posts 18439

Re: Template: Required elements of a mojoPortal layout.Master file

You are correct. I wrote the documentation some time ago and have not updated it. Since then MS AJAX scriptmanager came into existence. There are also some more optional elements that I need to document. I will do this as soon as I have a chance.

Best,

Joe

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