Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kyle Skrinak 272 posts 327 karma points
    Feb 12, 2011 @ 13:19
    Kyle Skrinak
    0

    RunwayDropdownNavigation problem

    Umbraco 4.5.2, .NET 4, IISExpress/WebMatrix

    I am using the RunwayDropdownNavigation macro/xslt. The XSLT for it adds scripts to the head section of my html. Afterwards, it is inserting an additional empty <title></title>. I can confirm this by removing the macro from the page. Doing so removes the <title> from the head section. The additional title tag renders an invalid HTML page. Where can I disable this invalid title tag output?

    BTW; just for kicks, I tried replacing RDN with the XSLT "Navigation Prototype" just for kicks. That, too, inserts an empty title into the head section. Wassup?!?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 12, 2011 @ 14:19
    Jan Skovgaard
    1

    Hi Kyle

    does your <head> element contain an runat="server" attribute? This could perhaps be the cause.

    /Jan

  • Kyle Skrinak 272 posts 327 karma points
    Feb 12, 2011 @ 14:27
    Kyle Skrinak
    0

    I think the answer is yes.

    The parent master page has <head id="head" runat="server"> defined. The child master page (where the macro is called) does not have a head attribute defined but it appears this is semantically correct?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 13, 2011 @ 09:55
    Jan Skovgaard
    1

    Hi Kyle

    Yes, there should only be a <head> element on the master template. The other templates inherit that.

    Do you know if there is a specific reason why the attribute is there? It's likely that it's that attribute that is causing the trouble I think.

    /Jan

  • Kyle Skrinak 272 posts 327 karma points
    Feb 13, 2011 @ 15:31
    Kyle Skrinak
    0

    HTML, I know. I didn't know if there was a .NET/Umbraco requirement apart from the html spec.

    I can't figure out why the extra title is there, that's the rub.

    Here's the code up to the macro:

          <!--[if lte IE 6]>
          <link rel="stylesheet" type="text/css" href="/css/ie6.css" />
          <![endif]-->
          <!-- end of stylesheets -->

        </head>
        <body>
          <div id="wrapper">
        <div id="wrapper-inner">
          <div id="header">
            <a id="home" href="/">&nbsp;</a>
            <div id="main-nav">
              <umbraco:Macro Alias="RunwayDropdownNavigation" runat="server"></umbraco:Macro>
            </div> <!-- end of main-nav -->

    And here's the rendered source of the HTML. You can see the title tag after the script tag in the head:

     <!--[if lte IE 6]>
          <link rel="stylesheet" type="text/css" href="/css/ie6.css" />
          <![endif]-->
          <!-- end of stylesheets -->
     
        <script id="ContentPlaceHolderDefault_jQuery" type="text/javascript" src="/umbraco_client/ui/jquery.js"></script><title>

    </title></head>
        <body>
          <div id="wrapper">
        <div id="wrapper-inner">
          <div id="header">
            <a id="home" href="/">&nbsp;</a>
            <div id="main-nav">
              <ul id="dropdownNavigation"><li><a href="/products.aspx">Products</a><ul>

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 13, 2011 @ 15:39
    Jan Skovgaard
    1

    Hi Kyle

    Hmm, yeah it's probably because of the script insertion, which requires the runat="server" attribute in the <head> element in order to work. For some reason it's inserting that empty <title> element...can't remember if there is an elegant solution to this.

    /Jan

  • Kyle Skrinak 272 posts 327 karma points
    Feb 14, 2011 @ 02:47
    Kyle Skrinak
    0

    I checked on a fresh install of 4.6.1 choosing the "Simple" site option during the installation. That site has the navigational XSLT AND it has the doubled title tag in the head section of the HTML source output. Is this a bug to file?

  • Kyle Skrinak 272 posts 327 karma points
    Feb 14, 2011 @ 12:23
Please Sign in or register to post replies

Write your reply to:

Draft