Copied to clipboard

Flag this post as spam?

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


  • Niels 63 posts 119 karma points
    Jan 23, 2012 @ 14:57
    Niels
    0

    Show image in rss feed

    I'm busy with creating a rssfeed for my newsitems(for the use of a newsletter). But is it possible to place an image in the feed, with the use of a mediapicker datatype. I've tried the following thing:

    <content:encoded>
      <![CDATA[
    <img src="]]>
     
    <xsl:value-of select='$node/imageNewsletter' />
      <![CDATA[">]]>
    </content:encoded>

    But I can't get it right.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 23, 2012 @ 18:33
    Jan Skovgaard
    0

    Hi Niels

    Can you ellaborate a bit more on what happens with the code above? Does it give you an error or what seems to be the problem? Or is the relative path returned correctly but the image is not being shown because it needs to have the full path to the image?

    Please also post a bit more of the code so we don't have to guess what is going on ;-)

    /Jan

  • Niels 63 posts 119 karma points
    Jan 25, 2012 @ 12:08
    Niels
    0

    Hi Jan,

    The code above was showing any results in the rss feed and there was no error given. I've managed to get a solution for this problem, like this:

    <xsl:if test="afbeelding != ''">
    <xsl:variable name="mediaNode" select="umbraco.library:GetMedia(afbeelding, 0)" />
    <enclosure length="100" url="{concat($SiteURL,'/ImageGen.ashx?image=',$mediaNode/umbracoFile,'&amp;width=125')}" type="image/png" />
    </xsl:if>

    Thanks for your reply

    Niels

Please Sign in or register to post replies

Write your reply to:

Draft