[TYPO3-mvc] Setting storagePid to the current page

Franz Ripfel typo3 at abezet.de
Mon Aug 30 14:45:16 CEST 2010


Hi Sebastian,

as a simple and working workaround you can override your Repository by  
using setRespectStoragePage, see following example:

Public Function getAllFotosOfSite() {
		//this is old way, if i remember correcly, try this if the other is not  
working
	#Tx_Extbase_Persistence_Typo3QuerySettings::setRespectStoragePage(FALSE);
	$query = $this->createQuery();
	$query->getQuerySettings()->setRespectStoragePage(FALSE);

	return  
$query->matching($query->equals('pid',$GLOBALS['TSFE']->id))->execute();
}

Greets
Franz

> Am 27.08.2010 21:49, schrieb Steffen Ritter:
>> as far as i know: if no storage pid is configured it defaults to  
>> current page....
> I experienced that it defaults to 0. But I would have expected the  
> current page..


-- 
Franz Ripfel, A.BE.ZET
http://www.abezet.de


More information about the TYPO3-project-typo3v4mvc mailing list