ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

show image in rss template

October 17, 2010 10:57pm

Subscribe [1]
  • #1 / Oct 17, 2010 10:57pm

    florian

    395 posts

    I thought this would be an easy task but for some reason I cant get the correct code to display a custom image field in the rss feed.

    here is the working rss template

    {assign_variable:master_weblog_name="blog"}
    {exp:rss:feed status="not closed" weblog="{master_weblog_name}"}
    
    <?xml version="1.0" encoding="{encoding}"?>
    <rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
    
    <channel>
        
    <title>{exp:xml_encode}{weblog_name}{/exp:xml_encode}</title>
    <link>{weblog_url}</link>
    <description>{weblog_description}</description>
    <dc:language>{weblog_language}</dc:language>
    <dc:creator>{email}</dc:creator>
    <dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
    <dc:date>{gmt_date format="%Y-%m-%dT%H:%i:%Q"}</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:weblog:entries weblog="{master_weblog_name}" limit="10" rdf="off" dynamic_start="on" status="not closed" disable="member_data|trackbacks"}
    <item>
    <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
    <link>{title_permalink=blog/article}</link>
    <guid>{title_permalink=blog/article}</guid>
    <description>
    <![CDATA[
    {content_preview}{content}
    <a href="http://www.mydomain.org/images/uploads/{photo}">http://www.mydomain.org/images/uploads/{photo}</a>
    <hr >
    Categories: {categories}<a href="http://{site_url}/blog/category/{category_url_title}/">{category_name}</a>{/categories}
    <a href="http://api.tweetmeme.com/share?url={site_url}blog/post/{url_title}">http://api.tweetmeme.com/imagebutton.gif?url={site_url}blog/post/{url_title}</a>
    ]]>
    </description>
    <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i%Q"}</dc:date>
    </item>
    {/exp:weblog:entries}
        
    </channel>
    </rss>
    
    {/exp:rss:feed}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases