Copied to clipboard

Flag this post as spam?

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


  • Claus Nedergaard 62 posts 104 karma points
    Jan 18, 2010 @ 13:24
    Claus Nedergaard
    0

    Present properties from a documenttype in a list/menu

    Not being a wizard at this I have a hard time presenting properties. I have created some properties in a doctype which will be filled with the content picker. My idea is to present this on the fontpage as a menu - a list of quicklinks.

    The code unfortunately produces no putput on my frontpage. Where am I off here?

    The two if tests i place before and after the for-each is for displaying menu layout files.

    <?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"
     exclude-result-prefixes="msxml umbraco.library">

    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:param name="currentPage"/>
    <xsl:template match="/">
    <xsl:if test="string($currentPage/ancestor-or-self::node/data [@alias='Layout_Genvejtop']) != '' ">
    <xsl:element name="img">
    <xsl:attribute name="src">
    <xsl:value-of select="umbraco.library:GetMedia($currentPage/ancestor-or-self::node/data[@alias='Layout_Genvejtop'], 'false')/data [@alias = 'umbracoFile']"/>
    </xsl:attribute>
    </xsl:element>
    </xsl:if>
    <xsl:if test="string($currentPage/ancestor-or-self::node/data [@alias='Qlink']) != '' ">
    <xsl:value-of select="umbraco.library:GetXmlNodeById($currentPage/ancestor-or-self::node/data[@alias='Qlink'], 'false')/data [@alias = 'umbracoFile']"/>
    </xsl:if>
    <xsl:for-each select="$currentPage/ancestor-or-self::node [string(data [@alias='umbracoNaviHide']) != '1']">
    <xsl:variable name="qlinkFile" select="./data[@alias='Qlink']"/>
    <xsl:if test="$qlinkFile != 0">
      <xsl:variable name="qlinkGet" select="umbraco.library:GetXmlNodeById($qlinkFile, 'false')/data[@alias='umbracoFile']"/>
      <div class="Quicklinks">
      <a href="{umbraco.library:NiceUrl(@id)}">
       <xsl:value-of select="$qlinkGet"/>
      </a>
      </div>
    </xsl:if>
    </xsl:for-each>
    <xsl:if test="string($currentPage/ancestor-or-self::node/data [@alias='Layout_Genvejbund']) != '' ">
    <xsl:element name="img">
    <xsl:attribute name="src">
    <xsl:value-of select="umbraco.library:GetMedia($currentPage/ancestor-or-self::node/data[@alias='Layout_Genvejbund'], 'false')/data [@alias = 'umbracoFile']"/>
    </xsl:attribute>
    </xsl:element>
    </xsl:if>

    </xsl:template>
    </xsl:stylesheet>
Please Sign in or register to post replies

Write your reply to:

Draft