0

I'm working on a project at the moment that I've recently taken over, which has the Umbraco CMS installed (4.7.1) and is written in ASP.net and I'm not really sure what I'm doing and have got stuck.

The CSS won't appear on one page, the ContactUs page (contact-us.aspx), but the CSS appears perfectly fine everywhere else, which I find really odd.

So my question is what do I need to do to get the CSS appearing on this page, like the others?

Here is the contact-us template:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="ContactUs.master.cs" Inherits="GreenHill.masterpages.ContactUs" 
  MasterPageFile="~/umbraco/masterpages/default.master"%>
<%@ Register TagPrefix="gh" TagName="ProductNav" Src="~/usercontrols/ProductNav.ascx" %>
<%@ Register TagPrefix="gh" TagName="ProductListing" Src="~/usercontrols/ProductListing.ascx" %>
<%@ Register TagPrefix="gh" TagName="Twitter" Src="~/usercontrols/Twitter.ascx" %>




<asp:Content runat="server" ID="pageContent" ContentPlaceHolderID="content">

    <div class="title">
        <h1>
            <asp:Literal ID="litTitle" runat="server"></asp:Literal></h1>
    </div>
    <div class="brown-border"></div>
    <table class="content">
        <tr>
            <td class="left main-column">
                <asp:Image runat="server" ID="imgHero" />
            </td>
            <td class="side-panel" rowspan="2">
                <gh:Twitter runat="server" id="ucTwitter"></gh:Twitter><br />
            </td>
        </tr>
        <tr>
            <td>
                <table class="small-table">
                    <tr>
                        <td class="left">
                            <h2>Contact Us</h2>
                        </td>
                        <td>
                            <h2>Say hi to the team</h2>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <div class="brown-border small-table-separator"></div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Literal runat="server" ID="litContent"></asp:Literal>
                        </td>
                        <td>

                          <form ID="form1" runat="server">
                            <div class="form">
                                <ul>
                                    <li>
                                        <asp:TextBox ID="txtName" runat="server" placeholder="Name"></asp:TextBox>
                                    </li>
                                    <li>
                                        <span id="nameError" class="error-message" style="display:none;">Please enter your name.</span>
                                    </li>
                                    <li>
                                        <asp:TextBox ID="txtEmail" runat="server" placeholder="Email"></asp:TextBox>
                                    </li>
                                    <li>
                                        <span id="emailError" class="error-message" style="display:none;">Please enter your email address.</span>
                                    </li>
                                    <li>
                                        <asp:TextBox ID="txtMessage" runat="server" Rows="5" TextMode="MultiLine" placeholder="Message"></asp:TextBox>
                                    </li>
                                    <li>
                                        <span id="messageError" class="error-message" style="display:none;">Please enter the message.</span>
                                    </li>
                                    <li>
                                        <asp:Literal ID="litMessage" runat="server"></asp:Literal>
                                    </li>
                                    <li>
                                        <asp:Button CssClass="button" ID="btnSend" runat="server" Text="Send" OnClientClick="return validate()" />
                                    </li>
                                </ul>
                            </div>
                          </form>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

    <script>
        $(document).ready(function () {
            RelatedProducts.addGap();
        });


    </script>
</asp:Content> 

And here is the base template:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Base.master.cs" Inherits="GreenHill.masterpages.Base" %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"> 



<head runat="server">
    <title>Greenhill Timbers</title>  
<asp:contentPlaceholder id="head" runat="server" />
<link rel="stylesheet" type="text/css" href="/css/global.css" /> 


  <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
  <script src="/scripts/navigation.js" type="text/javascript"></script>
  <script src="/scripts/tinker.js" type="text/javascript"></script>
    <script type="text/javascript" src="/scripts/jcarousellite_1.0.1.pack.js"></script>
    <script type="text/javascript" src="/scripts/captify.tiny.js"></script>
    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f07fd7a7ce8f226"></script>
    <script type="text/javascript">

      //jCarouselLite
        $(function () {
            $(".slider").jCarouselLite({
                //btnNext: ".next",
                auto: 3000,
                visible: 1,
                speead: 1000
            });
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="top-nav">
        <!--Contact Us | Sitemap | Example-->
    </div>
    <div class="brown-border"></div>
    <div class="header">
        <img class="logo" src="/images/GH_Top_Logo.png" />
            <asp:Repeater ID="rptNav" runat="server" OnItemDataBound="rptNav_DataBound">
                <HeaderTemplate>
                    <ul class="main-nav">
                    <li><a href="/" class="<%= HomeLinkClass %>">Home</a></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li class="separator">|</li>
                    <li>
                        <asp:HyperLink ID="linkPage" runat="server">
                            <asp:Literal ID="litPageTitle" runat="server"></asp:Literal>
                        </asp:HyperLink>
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    </ul>
                </FooterTemplate>
            </asp:Repeater>
    </div>
    <div class="brown-border"></div>
    <div class="main-outer">
    <div class="main">
        <asp:ContentPlaceHolder ID="content" runat="server">

        </asp:ContentPlaceHolder>

        <div class="footer-logo">
            <img src="/images/GH_Stamp_Footer.png" />
        </div>
    </div>
    <p class="footer">© 2011 GREENHILL TIMBERS P/L | 170 Settlement Road, Thomastown 3074 Australia | P. 03 9465 9875 | <a class="footer-link" href="mailto:info@greenhilltimbers.com.au">info@greenhilltimbers.com.au</a></p>
    </div>
    </form>
</body>
</html>

And finally there default.master template:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="default.master.cs" Inherits="umbraco.presentation.masterpages._default" %>
<asp:ContentPlaceHolder ID="ContentPlaceHolderDefault" runat="server">
</asp:ContentPlaceHolder>



<asp:ContentPlaceHolder id="content" runat="server">

        </asp:ContentPlaceHolder>
4

1 回答 1

0

你有:

MasterPageFile="~/umbraco/masterpages/default.master"

这意味着您的联系我们页面继承自默认的 Umbraco 母版页,而不是您的基本母版页。

我刚刚在打字时意识到你的问题已经有一周了,但无论如何我都会回答。:)

于 2013-11-07T21:04:25.623 回答