我想为Kentico创建一个ASPX Master模板,它也应该是门户引擎准备好的。因此,我使用以下代码在visual studio中创建了一个母版页:
<%@ 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>
我的挑战是门户引擎没有设计标签,我的图像也没有出现只有徽标图像出现。
答案 0 :(得分:2)
您没有看到“设计”选项卡,因为您使用的是纯ASPX模板。编辑模板(SiteManager-&gt;开发 - &gt;页面模板 - &gt;您的模板或CMS桌面 - &gt;文档 - &gt;属性 - &gt;模板 - &gt;编辑模板)并将模板类型切换为“ASPX + Portal”发动机”。 有关开发的更多信息,请参阅documentation。
您的图片可能不会因为路径错误而出现。使用开发人员控制台(如firebug)检查图像。你可以在任何浏览器中按F12来完成。找到您的图像并检查路径并进行调整,使其指向某个现有文件。