source: cpc/trunk/project/apps/frontend/modules/solr/templates/rssSuccess.php @ 1648

Last change on this file since 1648 was 1648, checked in by roux, 10 years ago

titre rss comments deputes

File size: 687 bytes
Line 
1<?php
2if (isset($rsstitle))
3  $title = $rsstitle;
4if ($title)
5  $feed->setTitle("NosDeputes.fr : $title");
6 else
7   $feed->setTitle("NosDeputes.fr : Recherche sur $query");
8$feed->setLink('http://'.$_SERVER['HTTP_HOST'].url_for('@recherche_solr?query='.$query));
9
10foreach ($results['docs'] as $record)
11{
12  $item = new sfFeedItem();
13  $item->setTitle($record['titre']);
14  $item->setLink('http://'.$_SERVER['HTTP_HOST'].$record['link']);
15  $item->setAuthorName($record['personne']);
16  $item->setPubdate(strtotime($record['date']));
17  $item->setUniqueId($record['id']);
18  $item->setDescription($record['highlighting']);
19  $feed->addItem($item);
20}
21decorate_with(false);
22echo $feed->asXml();
Note: See TracBrowser for help on using the repository browser.