More in this section

Forums / Developing with Sitefinity / Nav control with a master page

Nav control with a master page

7 posts, 0 answered
  1. don collins
    don collins avatar
    9 posts
    Registered:
    06 Sep 2009
    04 Feb 2010
    Link to this post
    Hello, I am using sitefinity 3.6 CMS edition. I designed a master page using Visual Basic 2008. In my first draft of the master page i placed a content Placeholder in a Div. When I try to drag and drop a Sitefinity Site Menu control into the content placeholder it works fine in Preview. When I try to preview the page I get an error. I know Im doing something wrong or am missing something in the code. Any help would be appreciated from this self taught newby. The code for my page  is below.  (the div with content placeholder in question is in bold) Thank you, Don

    <%@ Master Language="VB" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script runat="server">

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

        End Sub
    </script>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <asp:ContentPlaceHolder id="head" runat="server">
        </asp:ContentPlaceHolder>
        <style type="text/css">
            .newStyle1
            {
                font-family: Arial, Helvetica, sans-serif;
            }
            .newStyle2
            {
                font-family: Evanescent;
            }
            .newStyle3
            {
                background-color: #33CCFF;
                background-image: url('http://www.fringeparanormal.com/images/btn4.jpg');
                text-align: center;
                font-weight: bold;
                font-size: medium;
                font-family: Arial, Helvetica, sans-serif;
                font-variant: small-caps;
                color: #00FFFF;
                height: inherit;
                right: inherit;
                left: inherit;
            }
            .newStyle4
            {
                font-family: "BROKEN GHOST";
            }
        </style>
    </head>
    <body bgcolor="#3399ff">
        <form id="form1" runat="server">
        <div style="margin-left: -6px;">
        </div>
        <div style= margin-left: -6px;">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
            </asp:ContentPlaceHolder>

        </div>
        
        
        <asp:Image ID="Image1" runat="server"
            ImageUrl="http://www.fringeparanormal.com/images/NEWHEAD.jpg"
            Width="1024px" style="margin-left: -6px"/>
        <asp:Panel ID="Panel1" runat="server" BackColor="#EEEEEE" Height="30px"
            Width="1024px" style="margin-left: -6px">
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" Width="1024px"
            style="margin-left: -6px; margin-top: 5px;">
            <div style="float: right; width: 200px; margin-top: 10px; margin-right: 15px; background-color: #EEEEEE;">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
            </div>
            <div style="width: 686px; margin-left: 94px; background-color: #EEEEEE; font-family: Evanescent; font-size: xx-large; line-height: normal; float: left; visibility: visible;">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
                </asp:ContentPlaceHolder>
            </div>
        </asp:Panel>
        <div style="height: 0px">
        </div>
        <div style="background-color: #3399FF; margin-top: 5px; margin-left: 10px; height: 0px;">
            Copyright Fringe Paranormal. All rights reserved</div>
        </form>
        </body>
    </html>

  2. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    04 Feb 2010
    Link to this post
    Hi Don,

    Could you let me know what the error is you're getting?

    You could also try to adjust your code:
    <div style= margin-left: -6px;">
           <asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
           </asp:ContentPlaceHolder>
       </div>

    to this:
    <div style= margin-left: -6px;">
        <asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server" />
    </div>

    Greetings,
    Daniel
  3. don collins
    don collins avatar
    9 posts
    Registered:
    06 Sep 2009
    05 Feb 2010
    Link to this post
    Hi Daniel...here is the error page I get after I place the Site Menu control into the content placeholder and try to preview the template....

    Server Error in '/' Application.

    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>

    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>


    As I said when I initially drop the control into the spot it looks great and seems to work in edit template mode. Its after i try to preview the template that i get the error page. Also, the only file I uploaded is the actual template master page. Thanks, Don
  4. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    05 Feb 2010
    Link to this post
    Hi Don,

    It would help if you could set the custom error mode to 'Off', to see the real error?
    Like this:

    <customErrors mode="Off" defaultRedirect="Error.htm">
                 
    </customErrors>

    Regards,
    Daniel
  5. don collins
    don collins avatar
    9 posts
    Registered:
    06 Sep 2009
    05 Feb 2010
    Link to this post
    Hello, I log into a remote site and use the sitefinity software there to make my pages. As I cannot edit the webconfig file that is already there, I have made a webconfig file using visual studio and uploaded it to the remote server. Now I assume that I must connect my template to that webconfig somehow?  (Not sure if I mentioned it earlier but only the site menu controls cause a problem. Content and images and other controls seem to work ok.)  Thanks, Don
  6. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    06 Feb 2010
    Link to this post
    Hi Don,

    That should not be the way to enable it. The web.config from Sitefinity contains a lot more information then when you create a default one in Visual Studio.

    You don't have FTP access to the Sitefinity directory? It seems to me that you should have at least some kind of access to your files, e.g. when you want to upload new themes or templates.

    Try to find a way to edit the web.config on the remote server to change the error mode.
    For as far I can see, you are doing it in the right way and therefore it should be good to see the actual error.

    Regards,
    Daniel


  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    07 Feb 2010
    Link to this post
    Hi don,

    Check also the sitefinity.log to see whether the error is written there. The log is located under App_Data folder. If you disable the custom errors you should be able to see the actual error when you make a request.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Register for webinar
7 posts, 0 answered