Copied to clipboard

Flag this post as spam?

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


  • david 46 posts 81 karma points
    Feb 11, 2011 @ 12:20
    david
    0

    unclosed image tag

    hi, we are experimenting with this with a banner media type that has the digibiz advanced media picker and a text string.  when trying to use it in a xslt macro as a mediaCurrent parameter we are recieving the following xml

    <media>
      <banner id="21114" version="64b69dd4-33b0-4ac3-bd1c-0204b53c0c51" parentid="21113" level="2" writerid="0" nodetype="21110" template="0" sortorder="1" createdate="2011-02-10T15:46:29" updatedate="2011-02-10T15:46:29" nodename="HMP_Top_Banner" urlname="hmp_top_banner" writername="Administrator" nodetypealias="Banner" path="-1,21113,21114">
        <bannerimage>
          <damp fullmedia="">
            <mediaitem>
              <img id="21115" version="a6ffcc9e-9b35-41ff-8420-7f3f285b56fa" parentid="21113" level="2" writerid="0" nodetype="1032" template="0" sortorder="2" createdate="2011-02-10T15:48:11" updatedate="2011-02-10T15:48:12" nodename="topBannerHome" urlname="topbannerhome" writername="Administrator" nodetypealias="Image" path="-1,21113,21115">
                <umbracofile>/media/435488/topbannerhome.gif</umbracofile>
                <umbracowidth>435</umbracowidth>
                <umbracoheight>100</umbracoheight>
                <umbracobytes>48699</umbracobytes>
                <umbracoextension>gif</umbracoextension>
            </mediaitem>
          </damp>
        </bannerimage>
        <bannerurl>/home.aspx</bannerurl>
      </banner>
    </media>

    unfortunately the <img node is not closed, making it impossible to select the umbracofile, or am i doning something wrong?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 11, 2011 @ 13:28
    Jan Skovgaard
    0

    Hi David

    I have come accross this before and must remember to submit an issue about it on codeplex. You're using Umbraco v4.6.1, right?

    You should be able to fetch the image path from umbracoFile though. What does your XSLT code for doing this look like?

    /Jan

  • david 46 posts 81 karma points
    Feb 11, 2011 @ 13:39
    david
    0

    Thanks! we're on 4.5.2.  This is the xslt.  $media returns the snippet posted above.  bannerImage returns nothing

    <xsl:param name="currentPage"/>
    <xsl:variable name="media" select="/macro/media"/>
    <xsl:template match="/">
      <xsl:if test="$media">
        <p>media <xsl:copy-of select="$media" /></p>
        <p>bannerImage <xsl:copy-of select="$media/banner/bannerimage/damp/mediaitem/umbracofile" /></p>     
      </xsl:if>
    </xsl:template>
    </xsl:stylesheet>
  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 11, 2011 @ 15:57
    Jeroen Breuer
    0

    Hi David,

    This problem seems unrelated to the Digibiz Advanced Media Picker. The only thing DAMP does is call umbraco.library.getMedia and store that data in umbraco.config file.

    The problem you're having with the media from a macro is something I've had before. Try this:

    <p>bannerImage <xsl:copy-of select="/macro/media/banner/bannerimage/damp/mediaitem/umbracofile" /></p>

    So don't put the macro data in a variable, but call it directly. Worked for me last time.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft