aboutsummaryrefslogtreecommitdiff
path: root/app/views/index/rss.phtml
blob: 00be01c28c3150f7bf828cd2182443022889a58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?= '<?xml version="1.0" encoding="UTF-8" ?>'; ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><?= $this->rss_title ?></title>
		<link><?= Minz_Url::display(null, 'html', true) ?></link>
		<description><?= _t('index.feed.rss_of', $this->rss_title) ?></description>
		<pubDate><?= date('D, d M Y H:i:s O') ?></pubDate>
		<lastBuildDate><?= gmdate('D, d M Y H:i:s') ?> GMT</lastBuildDate>
		<atom:link href="<?= Minz_Url::display($this->url, 'html', true) ?>" rel="self" type="application/rss+xml" />
<?php
foreach ($this->entries as $item) {
?>
		<item>
			<title><?= $item->title() ?></title>
			<link><?= $item->link() ?></link>
			<?php
				$authors = $item->authors();
				if (is_array($authors)) {
					foreach ($authors as $author) {
						echo "\t\t\t" , '<dc:creator>', $author, '</dc:creator>', "\n";
					}
				}
				$categories = $item->tags();
				if (is_array($categories)) {
					foreach ($categories as $category) {
						echo "\t\t\t" , '<category>', $category, '</category>', "\n";
					}
				}
			?>
			<description><![CDATA[<?php
	echo $item->content();
?>]]></description>
			<pubDate><?= date('D, d M Y H:i:s O', $item->date(true)) ?></pubDate>
			<guid isPermaLink="false"><?= $item->id() ?></guid>
		</item>
<?php } ?>

	</channel>
</rss>