Copied to clipboard

Flag this post as spam?

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


  • Christian Richter-Pedersen 3 posts 23 karma points
    Apr 11, 2012 @ 13:11
    Christian Richter-Pedersen
    0

    Menu isn't showing the right page - XLST issue

    First of all I'll post the XLST

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
      version="1.0" 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" 
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">


    <li id="Item1Sub">
    <span>Portfolio</span>
      <ul class="subMenus" id="Item1SubMenu">
    <xsl:for-each select="$currentPage/ancestor::*/Portfolio/*">
                    <li id="item{@id}Gallery"><xsl:value-of select="@nodeName"/></li>
                    

                  </xsl:for-each>
          </ul>
    </li>
      
       <xsl:for-each select="$currentPage/ancestor-or-self::*/* [@isDoc and string(indholdType) = 1]">
                    <xsl:sort select="umbraco.library:StripHtml(menuOrder)" order="ascending"/>                
                    <li id="Item{@id}LB"><span><xsl:value-of select="umbraco.library:StripHtml(titel)"/></span>
                    </li>
                  </xsl:for-each>

    <li id="Item2Sub">
    <span>Video</span>
      <ul class="subMenus" id="Item2SubMenu">
        <xsl:for-each select="$currentPage/ancestor::*/*">
                    <li id="item{@id}video"><xsl:value-of select="@nodeName"/></li>
                    
                  </xsl:for-each>
          </ul>
    </li>

                 

    </xsl:template>

    </xsl:stylesheet>

     

    Second I outline the section that causes my trouble....

    <span>Video</span>
      <ul class="subMenus" id="Item2SubMenu">
        <xsl:for-each select="$currentPage/ancestor::*/*">
                    <li id="item{@id}video"><xsl:value-of select="@nodeName"/></li>

     

    I can't get the page Video to be shown as a clickable dropdown.
    It's like I amblind to find the right ID.

    Everything else in this XLST is working fine.

    Please be aware that I am not used to working with umbraco or XLSTs.

    How can I identity a page and get it to be shown via the XLST in the menu?

    I have tried reading a lot of how to's and so on.... without any luck.

    Thanks for your reply.



  • Christian Richter-Pedersen 3 posts 23 karma points
    Apr 12, 2012 @ 11:35
    Christian Richter-Pedersen
    0

    Now I changed it to this:

    <span>Video</span>
      <ul class="subMenus" id="Item2SubMenu">
        <xsl:for-each select="$currentPage/ancestor::*/*">
          <li id="item{@id}video"><xsl:value-of select="videoindhold" disable-output-escaping="yes"/></li>            

    and I am really getting data from the "videoindhold"...... but it is in code (HTML) and not rendered.

    I need the HTML actually to be rendered.

     

    What to do next?

  • Christian Richter-Pedersen 3 posts 23 karma points
    Apr 12, 2012 @ 12:02
    Christian Richter-Pedersen
    0

    with this .... <xsl:outputmethod="html"omit-xml-declaration="yes"/>

    I can make an youtube iframe render i the menu.

    Really nice actually......

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies