Show
Ignore:
Timestamp:
05/25/06 17:04:25 (6 years ago)
Author:
nick
Message:

Include the categories in the Feeds, in the appropriate places

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/RSS.pm

    r309 r312  
    200200       $title =~ s/</&lt;/g; 
    201201       $title =~ s/>/&gt;/g; 
     202 
     203    # Pop the categories into dublin core subject elements 
     204    #  (http://dublincore.org/usage/terms/history/#subject-004) 
     205    # TODO: Decide if we should include the "all categories listing" url 
     206    #        as the scheme (URI) attribute? 
     207    my $category_rss; 
     208    if($node->{metadata}->{category}) { 
     209        foreach my $cat (@{ $node->{metadata}->{category} }) { 
     210            $category_rss .= "  <dc:subject>$cat</dc:subject>\n"; 
     211        } 
     212    } 
    202213     
    203214    push @items, qq{ 
     
    214225  <modwiki:history>$history_url</modwiki:history> 
    215226  <rdfs:seeAlso rdf:resource="$rdf_url" /> 
     227$category_rss 
    216228</item> 
    217229};