From f2a9b07cc621996122a10c8083366624974ae0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matth=C3=A4us=20Gundlach?= Date: Fri, 7 Jul 2023 11:19:29 +0200 Subject: [PATCH] [FEATURE] Add cObjectData to Templates solves #27 --- Classes/Controller/PostController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Classes/Controller/PostController.php b/Classes/Controller/PostController.php index 5e1237c..ddb9295 100755 --- a/Classes/Controller/PostController.php +++ b/Classes/Controller/PostController.php @@ -25,7 +25,10 @@ public function listAction(): ResponseInterface $postRepository = GeneralUtility::makeInstance(PostRepository::class); $posts = $postRepository->findBySettings($this->settings); - $this->view->assign('posts', $posts); + $this->view->assignMultiple([ + 'cObjectData' => $this->request->getAttribute('currentContentObject')->data, + 'posts' => $posts, + ]); return $this->htmlResponse(); }