[TYPO3-mvc] Feature: automatic target page determination
Ernesto Baschny [cron IT]
ernst at cron-it.de
Thu Aug 5 09:58:38 CEST 2010
Franz Koch schrieb am 05.08.2010 09:45:
> 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).
I guess this would be possible, but then it would add a complexity that
isn't really needed. The "auto" setup is for a simple scenario. The
multi-domain setup could still require setting the pids manually. But I
am ok if Bastian wants to enhance the auto-setup to handle even more
scenarios. :)
Cheers,
Ernesto
More information about the TYPO3-project-typo3v4mvc
mailing list