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.

can't get RSS feed to work

October 15, 2009 8:38am

Subscribe [3]
  • #1 / Oct 15, 2009 8:38am

    jarintabata

    6 posts

    hi, i’m sure i’m doing something rather dumb, but after trawling through various threads in the forum that seem related, i still can’t get my rss feed to work. google reader declares ‘this feed contains no entries’

    i have multiple weblogs set up like so:

    http://toocooltodie.com/?cheatsheet

    this is the code for my rss template:

    {assign_variable:master_weblog_name="tctd"}
    {exp:rss:feed 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:%s%Q"}</dc:date>
        <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:weblog:entries weblog="aotw|interviews|listings|mixtape|mp3blog|news|reviews|video_now" limit="15" status="open" rdf="off" dynamic_start="on" disable="member_data|trackbacks"}
        <item>
          <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
          <link>{title_permalink=tctd/}</link>
          <guid>{title_permalink=tctd/}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description>{exp:xml_encode}{summary}{body}{/exp:xml_encode}</description>
          <dc:subject>{exp:xml_encode}{categories backspace="1"}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>
          <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
        </item>
    {/exp:weblog:entries}
        
        </channel>
    </rss>
    
    {/exp:rss:feed}

    im not sure i really have a ‘master weblog’ so i put in tctd, but i think this is the directory for my templates rather than a master weblog..

    any ideas?? thanks!!

  • #2 / Oct 15, 2009 9:30am

    Steven Grant

    894 posts

    You have called

    {assign_variable:master_weblog_name="tctd"}

    but then referenced a whole load of other weblogs within your weblog entries tag.

    If you remove the assign variable and then on the following line match exp:rss:feed to the same as weblog entries tag like so:

    {exp:rss:feed weblog="aotw|interviews|listings|mixtape|mp3blog|news|reviews|video_now"}
    
    <?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:%s%Q"}</dc:date>
        <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        
    {exp:weblog:entries weblog="aotw|interviews|listings|mixtape|mp3blog|news|reviews|video_now" limit="15" status="open" rdf="off" dynamic_start="on" disable="member_data|trackbacks"}
        <item>
          <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
          <link>{title_permalink=tctd/}</link>
          <guid>{title_permalink=tctd/}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description>{exp:xml_encode}{summary}{body}{/exp:xml_encode}</description>
          <dc:subject>{exp:xml_encode}{categories backspace="1"}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>
          <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
        </item>
    {/exp:weblog:entries}
        
        </channel>
    </rss>
    
    {/exp:rss:feed}
  • #3 / Oct 15, 2009 10:28am

    jarintabata

    6 posts

    fantastic. that worked, now to customize!
    thanks very much!!

  • #4 / Oct 15, 2009 10:31am

    jarintabata

    6 posts

    hey actually..now i notice the links don’t work in the items in the rss feed..
    i presume it has to do with this line:

    <link>{title_permalink=tctd/}</link>

    how can i customize this to insert the correct weblog url depending on which weblog the entry comes from if i’m dealing with multiple weblogs?

    thank you!

  • #5 / Oct 25, 2009 1:21am

    Marc Miller

    84 posts

    A quick and easy method is found in this post using {comment_entry_id_auto_path}:
    http://ellislab.com/forums/viewthread/110497/

    I just used it to do the same thing for my RSS feed.  Seeing the entry id is not as pretty as the permalink url, but it’s less work to set up. 

    Another option is some if/else statements on the weblog_id like in this post:

    http://ellislab.com/forums/viewthread/119299/

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases