summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-23 21:00:51 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-23 21:00:51 +0000
commitca366fc9025197a5d32034a446dc35b776101d78 (patch)
tree95e6600b4cc701d7a7f4fad76d695f6853efac76 /templates
parent07e68136bbc3d71c7c50b9526e13add37d8c7aee (diff)
add support for generating per-page rss feeds
Diffstat (limited to 'templates')
-rw-r--r--templates/page.tmpl5
-rw-r--r--templates/rsspage.tmpl21
2 files changed, 25 insertions, 1 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 1e484056e..5a7450af7 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -41,7 +41,10 @@
<p>
<!-- from <TMPL_VAR NAME=WIKINAME> -->
-last edited <TMPL_VAR NAME=MTIME>
+Last edited <TMPL_VAR NAME=MTIME>
+<TMPL_IF NAME="RSSURL">
+; <a type="application/rss+xml" href="<TMPL_VAR NAME=RSSURL>">RSS</a>
+</TMPL_IF>
</p>
</body>
diff --git a/templates/rsspage.tmpl b/templates/rsspage.tmpl
new file mode 100644
index 000000000..cbfeb5471
--- /dev/null
+++ b/templates/rsspage.tmpl
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+ <channel>
+ <title><TMPL_VAR TITLE ESCAPE=HTML></title>
+ <link><TMPL_VAR PAGEURL></link>
+ <description><TMPL_VAR TITLE ESCAPE=HTML></description>
+ <TMPL_LOOP NAME="ITEMS">
+ <item>
+ <title><TMPL_VAR ITEMTITLE ESCAPE=HTML></title>
+ <TMPL_IF NAME="ITEMGUID">
+ <guid isPermaLink="false"><TMPL_VAR ITEMGUID></guid>
+ <TMPL_ELSE>
+ <guid><TMPL_VAR ITEMURL></guid>
+ </TMPL_IF>
+ <link><TMPL_VAR ITEMURL></link>
+ <pubDate><TMPL_VAR ITEMPUBDATE></pubDate>
+ <description><![CDATA[<TMPL_VAR ITEMCONTENT>]]></description>
+ </item>
+ </TMPL_LOOP>
+ </channel>
+</rss>