Copied to clipboard

Flag this post as spam?

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


  • pna 11 posts 31 karma points
    Nov 09, 2010 @ 22:29
    pna
    0

    Getmedia U v. 4.5.2

    I am trying to create a  list of all fields on subpages and it works fine for text-fields (Tiny mce). But when I try to extract the content of an upload field  with an image - i get nothing. I have seen some of the postings concerning Getmedia and 4.5.2 - but I can't get it woorking.

    My code i quite simple.......

    when I run

     <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a>
      <xsl:value-of select="kunde_TXT" disable-output-escaping="yes"/>
      <br />
      <xsl:value-of select="picture" disable-output-escaping="yes"/>
      <br />

    I get the

       - the name of the subpage

       - the text in "Kunde_TXT " 

       -  the  filename (including the path)    of "pictue"

     

    But when i run

     

     <xsl:if test="$currentPage/picture !=''">
        <xsl:variable name="media" select="umbraco.library:GetMedia($currentPage/picture , '0')" />
        <xsl:variable name="alt" select="umbraco.library:GetMedia($currentPage/picture , 0)/@nodeName" />
            <img src="{$media/umbracoFile}" alt="{$alt}"/>
      </xsl:if>

    i get nothing.

     

    Any ideas- Thx / Poul

     



     


  • Almir Vereget 62 posts 150 karma points
    Nov 10, 2010 @ 09:41
    Almir Vereget
    0

    Hi,

    i believe in new xml schema getMedia should work like this:

    <xsl:variable name="media" select="umbraco.library:GetMedia($currentPage/picture , '0')/Image" />

    Hope it helps.

Please Sign in or register to post replies

Write your reply to:

Draft