It wraps the content in a CDATA tag, any images in the media folder are changed by adding the siteUrl in front of them. The siteUrl variable is defined like this:
The image is not in the bodyText. I get the path from my DocType's property called "photo". As I previously wrote, I successfully get the path, which I concat with the domain name.
The code above doesn't work as value-of doesn't accept any value outside the select property :(
This is totally crazy to read. The trick was to escape illegal character, even those required by CDATA. concat($siteUrl, photo) returns http://www.domain.com/photo.jpg
Rss: displaying an image in my feed
I'd like to insert an image in my RSS feed. This is technically feasible, but I cannot insert it.
Here is an example of what I am talking about::
http://www.dogglounge.com/feed/
If I well-understood, everything is embedded inside <content:encoded/> while <description /> doesn't accept any <img /> tag.
Any idea how to achieve this?
Thanks
Both the description and content node look like this in my RSS feed:
It wraps the content in a CDATA tag, any images in the media folder are changed by adding the siteUrl in front of them. The siteUrl variable is defined like this:
Thanks for posting ;)
I successfully rendered the image's url:
concat($siteUrl, photo)
Now I need to enclose the url into an <img />:
Such tag cannot be enclosed within the content node. Do I have to insert it whitin the CDATA? How can I escape illegal characters?
Thanks :)
Isn't the <img> already in your bodyText? You need to add an EXTRA image in there?
I'd try to do the same thing then yes, with CDATA, (not sure if this will work):
The image is not in the bodyText. I get the path from my DocType's property called "photo". As I previously wrote, I successfully get the path, which I concat with the domain name.
The code above doesn't work as value-of doesn't accept any value outside the select property :(
Here is the solution I found:
This is totally crazy to read. The trick was to escape illegal character, even those required by CDATA.
concat($siteUrl, photo) returns http://www.domain.com/photo.jpg
Hehe, glad you got it, this was going to be my next suggestion. It's messy, for sure, but it works! :-)
Thanks Sebastian. It was best to sleep on it, because the solution is much simpler. Take a look at the url:
http://stackoverflow.com/questions/4072872/xslt-embedding-an-image-in-a-rss-feed
The trick was to wrap <xsl:value-of /> inside 2 CDATA, then closing them accordingly:
is working on a reply...