Link the comment counter for articles to the comment section
authorAlexander Ebert <ebert@woltlab.com>
Fri, 14 Jan 2022 17:12:21 +0000 (18:12 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 14 Jan 2022 17:12:21 +0000 (18:12 +0100)
This commit also fixes the indentation of the template that used spaces instead of tabs.

Closes #4252

com.woltlab.wcf/templates/article.tpl
wcfsetup/install/files/lib/system/article/discussion/CommentArticleDiscussionProvider.class.php

index 0ae45db5fe729439fb4c3384c91c20bd8c085fd2..7c8e4f37c1b8f8695c2672c7319f4350ddbbed56 100644 (file)
                                
                                {if $article->getDiscussionProvider()->getDiscussionCountPhrase()}
                                        <li itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
-                                                <span class="icon icon16 fa-comments"></span>
-                                                {if $article->getDiscussionProvider()->getDiscussionLink()}<a href="{$article->getDiscussionProvider()->getDiscussionLink()}">{else}<span>{/if}
-                                                       {$article->getDiscussionProvider()->getDiscussionCountPhrase()}
-                                                {if $article->getDiscussionProvider()->getDiscussionLink()}</a>{else}</span>{/if}
+                                               <span class="icon icon16 fa-comments"></span>
+                                               {if $article->getDiscussionProvider()->getDiscussionLink()}<a href="{$article->getDiscussionProvider()->getDiscussionLink()}">{else}<span>{/if}
+                                               {$article->getDiscussionProvider()->getDiscussionCountPhrase()}
+                                               {if $article->getDiscussionProvider()->getDiscussionLink()}</a>{else}</span>{/if}
                                                <meta itemprop="interactionType" content="http://schema.org/CommentAction">
                                                <meta itemprop="userInteractionCount" content="{@$article->getDiscussionProvider()->getDiscussionCount()}">
                                        </li>
index c5f76633af5af2613c90e3efc2a06dcb8cb25446..f410a9c14146f63d232ee2ae8eb7bedec47518f2 100644 (file)
@@ -41,7 +41,7 @@ class CommentArticleDiscussionProvider extends AbstractArticleDiscussionProvider
      */
     public function getDiscussionLink()
     {
-        return '';
+        return $this->articleContent->getLink() . '#comments';
     }
 
     /**