Copied to clipboard

Flag this post as spam?

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


  • Bambu 4 posts 24 karma points
    Jul 28, 2011 @ 11:02
    Bambu
    0

    how get a Media with Umbraco 4.7

    hi,

    i'm working with umbraco 4.7 and i'm trying to show a image. I use the next code but don't show the image. Anybody knows why?

    My xslt:

    <?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:variable name="mediaPropName" select="/macro/imagen" />

    <xsl:template match="/">

    <xsl:variable name="media" select="umbraco.library:GetMedia($currentPage/@alias=$mediaPropName, 0) " />
    <img src="{$media/umbracoFile}" alt="{$media/altText}" />

    </xsl:template>

    </xsl:stylesheet>

     

    Thanks

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 28, 2011 @ 11:06
    Jeroen Breuer
    0

    Are you using the Digibiz Advanced Media Picker to select your media? If you do you can use this sample.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft