Menu

#16 multiple categories?

open
None
5
2008-06-18
2007-06-14
Franz Graf
No

Atom1.0 allows multiple categories for a FeedItem. I admit that I don't know if it is allowed in other formats too - but if it's allowed in other as well it would be fine if it could be added.

Discussion

  • KosherJava

    KosherJava - 2008-06-18
    • assigned_to: nobody --> papit01
     
  • Nobody/Anonymous

    I'm using Joomla with the component RD_RSS which is great. I've modified it so it sends the content->metakey in the item->category array (in feedcreator.php). However, feedcreator.php doesn't split based on commas like most other RSS feeds. It just spits out the long line.

    I've changed the lines in feedcreator.php to the following:

    if ($this->items[$i]->category!="") {
    $arr = split("[,]",$this->items[$i]->category);
    foreach($arr as $cat) {
    $feed.= " <category>\n";
    $feed.= " <![CDATA[".htmlspecialchars($cat)."]]>\n";
    $feed.= " </category>\n";
    }
    }

    This produces a better category output in the RSS feed, which can now be used by the feed consumer to key on the categories. Some aggregators that want RSS feeds to have categories correctly want this format (like wordpress does).

     

Log in to post a comment.

MongoDB Logo MongoDB