Ciao boots qui sotto come si presenta ora il file view.feed.php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
require_once JPATH_COMPONENT.DS.'view.php';
class JeaViewProperties extends JeaView
{
function display($tpl = null)
{
global $mainframe;
$document =& JFactory::getDocument();
$params =& $mainframe->getParams();
$siteEmail = $mainframe->getCfg('mailfrom');
$document->link = JRoute::_('index.php?option=com_jea&view=propertie s');
JRequest::setVar('limit', $mainframe->getCfg('feed_limit'));
$res = $this->get('properties');
var_dump($res);
foreach ( $res['rows'] as $row ) {
if(empty($row->title)) {
$title = ucfirst( JText::sprintf('PROPERTY TYPE IN TOWN',
$this->escape($row->type), $this->escape($row->town)));
} else {
// strip html from feed item title
$title = $this->escape( $row->title );
}
// url link to article
$item->link = JRoute::_('index.php?view=properties&id='. $row->id);
// strip html from feed item description text
$description = strip_tags($row->description);
$author = "Author"; // soon, will get the author name
// load individual item creator class
$item = new JFeedItem();
$item->title = html_entity_decode($title);
// $item->link = $link;
$item->description = $description;
$item->date = $row->date_insert;
$item->category = $row->type_id;
$item->author = $author;
$item->authorEmail = $feedemail;
// loads item info into rss array
$document->addItem( $item );
}
}
}