by
KK » Fri Jun 10, 2011 8:13 pm
Hi,
Apologies for this inordinate delay but we have been busy with the new release of Couch.
Answering your query about images and video in RSS feed - I see that you have tried using <images> tag in your feed. RSS specification has an <image> (not 'images' ) tag but there can be only one such tag per channel so this is not what we need.
Images and videos can simply be displayed as part of the <description> </description> tag wrapping them with the regular <cms:html_encode> tag.
In your case, the modified feed will become as follows -
- Code: Select all
<cms:content_type 'text/xml' /><cms:concat '<' '?xml version="1.0" encoding="' k_site_charset '"?' '>' />
<rss version="2.0">
<channel>
<title>Fouridine's Portfolio</title>
<link><cms:show k_site_link /></link>
<description>Description of this channel.</description>
<language>en-us</language>
<pubDate><cms:date format='D, d M Y H:i:s' gmt='1'/> GMT</pubDate>
<generator>Couch CMS</generator>
<cms:pages masterpage='work.php' limit="10">
<item>
<title><cms:show k_page_title /></title>
<link><cms:show k_page_link /></link>
<description>
<cms:html_encode>
<cms:excerptHTML><cms:show work_content/></cms:excerptHTML>
<div class="work_pc">
<cms:if video>
<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/<cms:show video />" frameborder="0" allowfullscreen></iframe>
</cms:if>
<cms:repeat count='6' startcount='1' >
<cms:set my_img_src="<cms:get "gallery_img_<cms:show k_count />" />" />
<cms:if "<cms:not_empty my_img_src />" >
<div id="photo_<cms:show k_page_id />_<cms:show k_count />" ><img src="<cms:show my_img_src />" /></div>
</cms:if>
</cms:repeat>
</div>
</cms:html_encode>
</description>
<pubDate><cms:date k_page_date format='D, d M Y H:i:s' gmt='1'/> GMT</pubDate>
</item>
</cms:pages>
</channel>
</rss>
Note how we show only an excerpt of the text and then go on to show the images/video if present.
Some feed readers always strip off images/videos while displaying a feed so if you are unable to see them in a particular reader, try another one. I have confirmed that images/videos appear as expected in Google Reader.
Hope this helps.