[TYPO3-ttnews] extend tx_news with extra field in related_links

Muriel le Pair typo3 at strangefruit.nl
Tue Jun 10 14:03:52 CEST 2014


Hi,

I have extended tx_news with some extra fields to the table 
tx_news_domain_model_news. These all work fine.

I would also link to add an extra field to related links (the table 
tx_news_domain_model_link).
This seems to work fine in the BE: The field is visible and I can store 
a date.

But if I output the related links array of the tx_news template the 
field that I have added is not in there.
<f:debug title="Related link array">{relatedLink}</f:debug>

What am I doing wrong?


class News extends Tx_News_Domain_Model_News {

/**
* related_link: sf_datetime
*
* @var 
\TYPO3\CMS\Extbase\Persistence\ObjectStorage<\SF\SfExtendnews\Domain\Model\Link>
*/
protected $sfDatetime;

/**
* Returns the relatedlink: sf_datetime
*
* @param 
\TYPO3\CMS\Extbase\Persistence\ObjectStorage<\SF\SfExtendnews\Domain\Model\Link> 
$sfDatetime
*/
public function getsfDatetime() {
	return $this->sfDatetime;
}

/**
* Sets the sf_datetime
*
* @param 
\TYPO3\CMS\Extbase\Persistence\ObjectStorage<\SF\SfExtendnews\Domain\Model\Link> 
$sfDatetime
  * @return void
*/
public function 
setSfDatetime(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $sfDatetime) {
	$this->sfDatetime = $sfDatetime;
}

}

--
kind regards,

Muriel le Pair	


More information about the TYPO3-project-tt-news mailing list