You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/12/07 18:37:26 UTC

svn commit: r483561 - /incubator/roller/trunk/web/WEB-INF/velocity/weblog.vm

Author: agilliland
Date: Thu Dec  7 09:37:25 2006
New Revision: 483561

URL: http://svn.apache.org/viewvc?view=rev&rev=483561
Log:
update feed autodiscovery macro to add contextual feeds for tag and category urls.


Modified:
    incubator/roller/trunk/web/WEB-INF/velocity/weblog.vm

Modified: incubator/roller/trunk/web/WEB-INF/velocity/weblog.vm
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/velocity/weblog.vm?view=diff&rev=483561&r1=483560&r2=483561
==============================================================================
--- incubator/roller/trunk/web/WEB-INF/velocity/weblog.vm (original)
+++ incubator/roller/trunk/web/WEB-INF/velocity/weblog.vm Thu Dec  7 09:37:25 2006
@@ -68,12 +68,24 @@
 Show RSS, Atom and RSD auto-discovery links as HTML link elements.
 *#
 #macro(showAutodiscoveryLinks $weblog)
-    <link rel="alternate" type="application/atom+xml" title="Atom Entries"  href="$url.feed.entries.atom" />
-    <link rel="alternate" type="application/atom+xml" title="Atom Comments" href="$url.feed.comments.atom" />
-    <link rel="alternate" type="application/rss+xml"  title="RSS Entries"   href="$url.feed.entries.rss" />
-    <link rel="alternate" type="application/rss+xml"  title="RSS Comments"  href="$url.feed.comments.rss" />
     #if ($weblog.enableBloggerApi)
        <link rel="EditURI"   type="application/rsd+xml" title="RSD" href="$url.rsd"/>
+    #end
+    
+    ## main feed urls are always available
+    <link rel="alternate" type="application/atom+xml" title="Recent Entries (Atom)"  href="$url.feed.entries.atom" />
+    <link rel="alternate" type="application/rss+xml"  title="Recent Entries (RSS)"   href="$url.feed.entries.rss" />
+    <link rel="alternate" type="application/atom+xml" title="Recent Comments (Atom)" href="$url.feed.comments.atom" />
+    <link rel="alternate" type="application/rss+xml"  title="Recent Comments (RSS)"  href="$url.feed.comments.rss" />
+
+    #if ($model.tags)
+      <link rel="alternate" type="application/atom+xml" title="Entries tagged $model.tags.toString() (Atom)"  href="$url.feed.entries.atom($model.tags, false)" />
+      <link rel="alternate" type="application/rss+xml"  title="Entries tagged $model.tags.toString() (RSS)"   href="$url.feed.entries.rss($model.tags, false)" />
+    #elseif ($model.weblogCategory)
+      <link rel="alternate" type="application/atom+xml" title="Entries for category $model.weblogCategory.name (Atom)"  href="$url.feed.entries.atom($model.weblogCategory.path, false)" />
+      <link rel="alternate" type="application/rss+xml"  title="Entries for category $model.weblogCategory.name (RSS)"   href="$url.feed.entries.rss($model.weblogCategory.path, false)" />
+    #else
+      
     #end
 #end