In my TYPO3 installaion I have configured two websites in two separate page trees. Now I would like to show a record of a custom extension in website A but the record is stored in the page tree of website B.
This is the showAction in my controller:
public function showAction(\Vendor\Extension\Domain\Model\Event $event)
{
$this->view->assign('event', $event);
}
In the repository I disabled the storage page restriction with the following lines of code:
class EventRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
public function initializeObject()
{
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
$querySettings->setRespectStoragePage(false);
$this->setDefaultQuerySettings($querySettings);
}
}
Showing a record on website A which is stored in the page tree of website A, works without any problems. But as soon as I try to load a record of the page tree of website B on website A it fails.
So is it possible to show records which are stored outside of the page tree?