OptimusBain Posted February 2, 2021 Posted February 2, 2021 Hello everyone, I was wondering whether it is possible to place the description field of a forum discussion at the top of a post included in that discussion category. There will be many different discussion categories. The description explains what it is about, however, when we are inside the different posts inside the discussion category, the description is not shown. You can see an example of what I am trying to explain in the screenshot attached. Can description 1 be shown under the channel name when we are inside the category? 1 shown at 2. Is there a way to do that or create a plugin that sort of allows me to do that? Thanks a lot
Solution Nathan Explosion Posted February 2, 2021 Solution Posted February 2, 2021 The template you would need to edit it is forums -> front -> topics ->topic. Search for the following in there: {{if $topic->canEdit()}} <span class='ipsType_break ipsContained' data-controller="core.front.core.moderation"> <span data-role="editableTitle" title='{lang="click_hold_edit"}'>{$topic->title}</span> </span> {{else}} <span class='ipsType_break ipsContained'> <span>{$topic->title}</span> </span> {{endif}} Within that, you can add in the following items to display information about the forum: {$topic->container()->metaTitle()} {$topic->container()->metaDescription()} Example - replacing the above with the below gives you the result in the image: {{if $topic->canEdit()}} <span class='ipsType_break ipsContained' data-controller="core.front.core.moderation"> <span data-role="editableTitle" title='{lang="click_hold_edit"}'>{$topic->title}</span> <br> <span>{$topic->container()->metaTitle()}</span> <span>{$topic->container()->metaDescription()}</span> </span> {{else}} <span class='ipsType_break ipsContained'> <span>{$topic->title}</span> <br> <span>{$topic->container()->metaTitle()}</span> <span>{$topic->container()->metaDescription()}</span> </span> {{endif}} OptimusBain 1
OptimusBain Posted February 8, 2021 Author Posted February 8, 2021 (edited) On 2/2/2021 at 2:23 PM, Nathan Explosion said: The template you would need to edit it is forums -> front -> topics ->topic. Search for the following in there: {{if $topic->canEdit()}} <span class='ipsType_break ipsContained' data-controller="core.front.core.moderation"> <span data-role="editableTitle" title='{lang="click_hold_edit"}'>{$topic->title}</span> </span> {{else}} <span class='ipsType_break ipsContained'> <span>{$topic->title}</span> </span> {{endif}} Within that, you can add in the following items to display information about the forum: {$topic->container()->metaTitle()} {$topic->container()->metaDescription()} Example - replacing the above with the below gives you the result in the image: {{if $topic->canEdit()}} <span class='ipsType_break ipsContained' data-controller="core.front.core.moderation"> <span data-role="editableTitle" title='{lang="click_hold_edit"}'>{$topic->title}</span> <br> <span>{$topic->container()->metaTitle()}</span> <span>{$topic->container()->metaDescription()}</span> </span> {{else}} <span class='ipsType_break ipsContained'> <span>{$topic->title}</span> <br> <span>{$topic->container()->metaTitle()}</span> <span>{$topic->container()->metaDescription()}</span> </span> {{endif}} Thanks so much!!! Much appreciated! Edited February 8, 2021 by Alfonso Moreno
Recommended Posts