Peter
Peter

Reputation: 803

Kentico Master Page Templating in ASPX

I want to create an ASPX Master template for Kentico which should also be portal engine ready. So, I created a master page in visual studio with the following codes:

   <%@ Master Language="C#" AutoEventWireup="true" CodeFile="GeneralSite.master.cs"                 Inherits="CMSTemplates_Hygeia_MasterPage" %>
   <%@ Register Src="~/CMSWebParts/General/CSSStyleSelector.ascx" TagName="CSSStyleSelector" TagPrefix="cms" %>
   <%@ Register Src="~/CMSWebParts/Navigation/cmslistmenu.ascx" TagName="listmenu" TagPrefix="cms" %>
   <%@ Register Src="~/CMSWebParts/SmartSearch/SearchBox.ascx" TagName="SearchBox" TagPrefix="cms" %>
   <%@ Register Src="~/CMSWebParts/navigation/cmsbreadcrumbs.ascx" TagName="breadcrumbs" TagPrefix="cms" %>
   <%@ Register Src="~/CMSWebParts/Viewers/Documents/cmsuniview.ascx" TagName="DocumentHierarchicalViewer" TagPrefix="cms" %>
   <%@ Register Src="~/CMSWebParts/Text/statictext.ascx" TagName="PoweredByKentico" TagPrefix="cms" %>
   <%@ Register Src="~/CMSWebParts/Membership/Logon/logonminiform.ascx" TagName="logonminiform" TagPrefix="cms" %>
   <%@ Register Src="~/CMSWebParts/Membership/Logon/signoutbutton.ascx" TagName="SignOutButton" TagPrefix="cms" %>
   <%@ Register Src="~/CMSWebParts/Membership/Logon/currentuser.ascx" TagName="currentuser" TagPrefix="cms" %>
   <%=DocType%>
   <html xmlns="http://www.w3.org/1999/xhtml" <%=XmlNamespace%>>
   <head id="head" runat="server" enableviewstate="false">
   <title id="title" runat="server">Hygeia</title>
   <asp:Literal runat="server" ID="ltlTags" EnableViewState="false" />
   <link href="../../App_Themes/Hygeia/global_css.css" type="text/css" rel="Stylesheet" media="screen" />
   </head>
   <body class="<%=BodyClass%>" <%=BodyParameters%>>
   <form id="form1" runat="server">
   <asp:PlaceHolder runat="server" ID="plcManagers">
    <ajaxToolkit:ToolkitScriptManager ID="manScript" runat="server" EnableViewState="false"
        ScriptMode="Release" />
   <cms:CMSPortalManager ID="manPortal" runat="server" EnableViewState="false" />
      </asp:PlaceHolder>

   <cms:ContextMenuPlaceHolder ID="plcCtx" runat="server" />
   <div class="global">

   <div class="overlap">
    <div class="logo">
            <img src="../../App_Themes/Hygeia/images/logo.png" width="445" height="671" alt="About Hygeia Nigeria Limited" />
    </div>
    <div class="right_overlay">
        <div class="hygeia_menu">
            <!-- //Mega -->
              <div id="navbar">
                        <div id="navbar-inner" class="clearfix">
                            <nav id="nav">
                          <!-- begin navigation -->
                                <cms:listmenu runat="server" ID="navlist" Path="/%" ClassNames="CMS.MenuItem" MaxRelativeLevel="2"
                                    RenderCssClasses="True" ItemIdPrefix="navlist" HideControlForZeroRows="False"
                                    CacheDependencies="##DEFAULT##" />
                          <!-- end navigation -->
                            </nav>
                        </div>
               </div>
               <!-- //Mega -->
     </div>
        <div class="hygeia_search">
            <cms:SearchBox runat="server" ID="wSB" SearchButtonCssClass="s-btn" SearchTextboxCssClass="srch"
                SearchResultsPageUrl="" ShowSearchLabel="False" SearchMode="anyword"
                ShowImageButton="False" />
        </div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
           <cms:CMSPagePlaceholder ID="plcZones" runat="server">

         </cms:CMSPagePlaceholder>
        </asp:ContentPlaceHolder>

     <div class="hm_footer">

     <div class="_footer">
    <a href="#">Contact Us </a> 
    <a href="#">Site Map</a> 
    <a href="#">Legal</a> 
    <a href="#">Privacy Statement</a> 
    <a href="#">Send Feedback</a><br />
    <strong>© 2013  Hygeia Group.</strong> All Rights Reserved. 
   </div>

    <div class="socialmedia"><a href="#"><img src="../../App_Themes/Hygeia/images/twitter.jpg" width="27" height="24" alt="Twitter" />             
    </a>
    <a href="#"><img src="../../App_Themes/Hygeia/images/youtube.jpg" width="22" height="22" alt="Youtube" /></a>
    <a href="#"><img src="../../App_Themes/Hygeia/images/facebook.jpg" width="23" height="22" alt="Facebook" /></a>
    <a href="#"><img src="../../App_Themes/Hygeia/images/linkedin.jpg" width="22" height="22" alt="Linkedin" /></a>
    </div>
    </div>

    </div>
   <div class="socialfloat">
<div class="fbk"><a href="#"><img src="../../App_Themes/Hygeia/images/facebook-float.png" width="21" height="74" alt="Facebook" /></a></div>
<div class="twt"><a href="#"><img src="../../App_Themes/Hygeia/images/twitterfloat.png" width="21" height="88" alt="Twitter" /></a></div>
    </div>

    </form>
    </body>
    </html>

My challenge with this is that the portal engine did not have the design tab and also my images did not appear only the logo image appeared.

Upvotes: 0

Views: 1317

Answers (1)

rocky
rocky

Reputation: 7696

you don't see Design tab because you are using pure ASPX template. Edit your template (SiteManager->Development->Page templates->Your template OR CMS Desk->Document->Properties->Template->Edit template) and switch the template type to "ASPX + Portal engine". For more information about development see the documentation.

Your images do not appear probably because their path is wrong. Inspect the image using developer console such as firebug. You can do it by pressing F12 in any browser. Find your image and check the path and adjust it so that it points to some existing file.

Upvotes: 2

Related Questions