有没有办法通过Typoscript替换/覆盖扩展名的默认de.locallang.xlf?我想以一种可以在更新后保存的方式更改mindshape_cookie_hint的文本。
我想将列表操作的视图模板用于我的 listByYear 操作。我尝试 setTemplatePathAndFilename 但没有成功。它仍然找不到模板。
抱歉,未找到请求的视图。
技术原因是:没有找到模板。无法解析类“XXX\YYY\Controller\EventController”中操作“listByYear”的视图。
/**
* action listByYear
* @param \XXX\YYY\Domain\Model\Event $event
*
* @return void
*/
public function listByYearAction(\XXX\YYY\Domain\Model\Event $event)
{
$date = $event->getStart();
$events = $this->eventRepository->findByYear($date->format('Y'));
$this->view->setTemplatePathAndFilename(
'typo3conf/ext/' .
$this->request->getControllerExtensionKey() .
'/Resources/Private/Templates/Event/List.html'
);
debug('typo3conf/ext/' .
$this->request->getControllerExtensionKey() .
'/Resources/Private/Templates/Event/List.html');
$this->view->assign('events', $events);
}
Run Code Online (Sandbox Code Playgroud)
如何让它使用列表模板?