Source for file view.feed.php
Documentation is available at view.feed.php
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Search feed view class for the Finder package.
* Method to display the view.
* @param string $tpl A template file to load. [optional]
* @return mixed JError object on failure, void on success.
public function display($tpl =
null)
// Adjust the list limit to the feed limit.
$app->input->set('limit', $app->getCfg('feed_limit'));
$state =
$this->get('State');
$params =
$state->get('params');
$query =
$this->get('Query');
$results =
$this->get('Results');
// Push out the query data.
JHtml::addIncludePath(JPATH_COMPONENT .
'/helpers/html');
$explained =
JHtml::_('query.explained', $query);
// Set the document title.
$title =
$params->get('page_title', '');
$title =
$app->getCfg('sitename');
elseif ($app->getCfg('sitename_pagetitles', 0) ==
1)
$title =
JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
elseif ($app->getCfg('sitename_pagetitles', 0) ==
2)
$title =
JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
$this->document->setTitle($title);
// Configure the document description.
// Set the document link.
$this->document->link =
JRoute::_($query->toURI());
// If we don't have any results, we are done.
// Convert the results to feed entries.
foreach ($results as $result)
// Convert the result to a feed entry.
$item->title =
$result->title;
$item->link =
JRoute::_($result->route);
$item->description =
$result->description;
$item->date = (int)
$result->start_date ?
JHtml::date($result->start_date, 'l d F Y') :
$result->indexdate;
// Get the taxonomy data.
$taxonomy =
$result->getTaxonomy();
// Add the category to the feed if available.
if (isset
($taxonomy['Category']))
$item->category =
$node->title;
// Loads item info into RSS array
$this->document->addItem($item);
Documentation generated on Tue, 19 Nov 2013 15:16:47 +0100 by phpDocumentor 1.4.3