diff --git a/Classes/Controller/PostController.php b/Classes/Controller/PostController.php index d7034fd2..0daf7c75 100644 --- a/Classes/Controller/PostController.php +++ b/Classes/Controller/PostController.php @@ -255,9 +255,7 @@ public function listPostsByCategoryAction(Category $category = null) */ public function listPostsByAuthorAction(Author $author = null) { - if (null === $author) { - $this->view->assign('authors', $this->authorRepository->findAll()); - } else { + if ($author) { $posts = $this->postRepository->findAllByAuthor($author); $this->view->assign('posts', $posts); $this->view->assign('author', $author); @@ -266,6 +264,8 @@ public function listPostsByAuthorAction(Author $author = null) foreach ($posts as $post) { $this->blogCacheService->addTagsForPost($post); } + } else { + $this->view->assign('authors', $this->authorRepository->findAll()); } } diff --git a/Resources/Private/Templates/Post/ListPostsByAuthor.html b/Resources/Private/Templates/Post/ListPostsByAuthor.html index 82420906..c9da321f 100644 --- a/Resources/Private/Templates/Post/ListPostsByAuthor.html +++ b/Resources/Private/Templates/Post/ListPostsByAuthor.html @@ -2,23 +2,21 @@ - + - In case authors is set, to special author is in request and we show all authors as links. +

+
+

{author.bio}

+
+ +
+

- - - In case authors is NOT set, a special author is in request and we show all blogs posts of this author. -

-
-

{author.bio}

-
-