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.

RSS feed with multiple channel orderby issue

December 01, 2013 12:42am

Subscribe [1]
  • #1 / Dec 01, 2013 12:42am

    gennaria

    8 posts

    Hi,

    I am trying to output an RSS feed with content from multiple channels. My challenge is that the feed is outputting entries sorted by channel first. So entries from the first channel are listed before entries from the next channel instead of sorting all of the channels together. Is this a bug? Is there a way around this? Is this expected behavior?

    Here is my RSS feed code…

    {exp:rss:feed channel="kitchen_and_studio" debug="yes"}
    
    <?xml version="1.0" encoding="{encoding}"?>
    <rss versi
        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:c>
    
        <channel>
        
        <title>{exp:xml_encode}Recipes for a Sweet Life{/exp:xml_encode}</title>
        <link>{channel_url}</link>
        <description>{channel_description}</description>
        <dc:language>{channel_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:channel:entries channel="kitchen_and_studio|gallery|news|library" orderby="date" sort="desc" limit="50" rdf="off" dynamic_start="on" disable="member_data|pagination"}
        <item>
          <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
          <link>{if custom_url !=""}http://www.juliausher.com{custom_url}{if:else}{comment_auto_path}/more/{url_title}{/if}</link>
          <guid isPermaLink="false">#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description><![CDATA[{if intro !=""}{intro}{if:else}{left_column}{/if}
    {if main_image!=""}{main_image}]]></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:channel:entries}
        
        </channel>
    </rss>
    
    {/exp:rss:feed}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases