[TYPO3-dev] Correct check for localisation and workspace in fe plugin

Jigal van Hemert jigal at xs4all.nl
Tue Jan 24 21:58:46 CET 2012


Hi,

On 24-1-2012 18:48, Christian Welzel wrote:
> what is the correct way to determine the uid of a content element in a
> fe-plugin regarding localisation and workspaces?

The way to get a localized version of a table row:

if ($GLOBALS['TSFE']->sys_language_content) {
	$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay('table_name', $row, 
$GLOBALS['TSFE']->sys_language_content, 
$GLOBALS['TSFE']->sys_language_contentOL, '');
}

The way to get the workspace overlay:

$GLOBALS['TSFE']->sys_page->versionOL('table_name', $row);

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert.



More information about the TYPO3-dev mailing list