Se vedi gli id sono ok.
Adesso modifica il file così:
Codice PHP:
$res = $this->get('properties');
$log = '';
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;
$log .= $item->link.PHP_EOL;
// loads item info into rss array
$document->addItem( $item );
}
file_put_contents("/home/websites/borgo/html/log/log.txt", $log); // fuori dal foreach