[TYPO3-ttnews] tt_news DAM connector (news_dam_con) and localized records

Karl-Ernst Kiel kekiel at kekiel.de
Mon Jun 19 23:28:29 CEST 2006


Hi!

Karl-Ernst Kiel wrote:
> I´m using tt_news(2.4.0) with news_dam_con(0.2.0).
> In the backend I am able to attach different DAM elements to a 
> "standard" news record and the localized version of this record.
> 
> In frontend-view my localized news records are shown with translated 
> texts but they have always the DAM elements from the "standard-language" 
> record attached.

Here is my solution:

/typo3conf/ext/news_dam_con/class.tx_newsdamcon.php

in function "extraItemMarkerProcessor" (line 60):

The "original" query takes the pid as parameter:
$res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query ('tx_dam.*', 
'tt_news', 'tx_newsdamcon_tt_news_dam_elements_mm', 'tx_dam', 
$whereClause='AND tt_news.uid='.row['uid'], $groupBy='', $orderBy='', 
$limit='');

If there is a "_LOCALIZED_UID" this ID should be taken instead, so I 
changed it into:

$search_id = $row['_LOCALIZED_UID'] ? $row['_LOCALIZED_UID'] : row['uid'];

$res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query ('tx_dam.*', 
'tt_news', 'tx_newsdamcon_tt_news_dam_elements_mm', 'tx_dam', 
$whereClause='AND tt_news.uid='.$search_id, $groupBy='', $orderBy='', 
$limit='');


Greetings,
Karl-E.



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