diff --git a/Classes/Controller/TestimonialController.php b/Classes/Controller/TestimonialController.php index eb3d2e4..97ac774 100644 --- a/Classes/Controller/TestimonialController.php +++ b/Classes/Controller/TestimonialController.php @@ -14,6 +14,7 @@ namespace OliverKlee\Tea\Controller; * The TYPO3 project - inspiring people to share! */ +use OliverKlee\Tea\Domain\Model\Testimonial; use OliverKlee\Tea\Domain\Repository\TestimonialRepository; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; @@ -48,4 +49,13 @@ class TestimonialController extends ActionController { $this->view->assign('testimonials', $this->testimonialRepository->findAll()); } + + /** + * @param Testimonial $testimonial + * + * @return void + */ + public function showAction(Testimonial $testimonial) { + $this->view->assign('testimonial', $testimonial); + } } diff --git a/Resources/Private/Templates/Testimonial/Index.html b/Resources/Private/Templates/Testimonial/Index.html index 754d6d4..6be85d8 100644 --- a/Resources/Private/Templates/Testimonial/Index.html +++ b/Resources/Private/Templates/Testimonial/Index.html @@ -4,13 +4,12 @@

- - - - {testimonial.dateOfPosting} + + + + + {testimonial.dateOfPosting} +

- - {testimonial.text} -
\ No newline at end of file diff --git a/Resources/Private/Templates/Testimonial/Show.html b/Resources/Private/Templates/Testimonial/Show.html new file mode 100644 index 0000000..1e666a8 --- /dev/null +++ b/Resources/Private/Templates/Testimonial/Show.html @@ -0,0 +1,13 @@ + + + +

+ + + + {testimonial.dateOfPosting} +

+ + {testimonial.text} + +
\ No newline at end of file diff --git a/ext_localconf.php b/ext_localconf.php index b956123..3070352 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -6,10 +6,10 @@ defined('TYPO3_MODE') or die('Access denied.'); 'Tea', // all actions [ - 'Testimonial' => 'index', + 'Testimonial' => 'index,show', ], // non-cacheable actions [ - 'Testimonial' => 'index', + 'Testimonial' => '', ] );