Copied to clipboard

Flag this post as spam?

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


  • Garrett Fisher 341 posts 496 karma points
    Nov 13, 2009 @ 21:27
    Garrett Fisher
    0

    how to get filename from media picker field?

    Hi,

    I have a document type that uses a media picker field called "file".  I chose a PDF in the page instance and saved/published.  In my XSLT, I have a link to it:

    <a href="{./data [@alias = 'file']}" target="_new">PDF</a>

    But, oddly, all this is outputting is a NUMBER (eg. "1453").  Why wouldn't it give me the path to the file??  How can I get this to print in the href?  1453 is meaningless.

    Thanks,

    Garrett

  • Masood Afzal 176 posts 522 karma points
    Nov 13, 2009 @ 21:55
    Masood Afzal
    0
            <img>
    <xsl:attribute name="src">
    <xsl:value-of select="umbraco.library:GetMedia($currentPage/data [@alias=$imgAlias], 'false')/data [@alias='umbracoFile']" />
    </xsl:attribute>
    </img>
  • Masood Afzal 176 posts 522 karma points
    Nov 13, 2009 @ 21:56
    Masood Afzal
    0
    <xsl:value-of select="umbraco.library:GetMedia($currentPage/data [@alias='file'], 'false')/data [@alias='umbracoFile']" />
Please Sign in or register to post replies

Write your reply to:

Draft