[TYPO3-mvc] Feature: automatic target page determination

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Aug 5 09:45:22 CEST 2010


Hey,

> Consider adapting your query. Instead of:
>
> $pages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('pid', 'tt_content',
> 'list_type=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($pluginSignature,
> 'tt_content') . ' AND hidden=0 AND deleted=0', '', '', 2);
>
> better use enableFields (also considers start/endtime/permissions):
>
> $pages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
> 	'pid',
> 	'tt_content',
> 	'list_type=' .
> 		$GLOBALS['TYPO3_DB']->fullQuoteStr($pluginSignature, 'tt_content') .
> 		$GLOBALS['TSFE']->sys_page->enableFields('tt_content'),
> 	'',
> 	'',
> 	2
> );

you also have to consider multi-domain setups, so the query should also 
be restricted to the rootpage (if defined).

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list