Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 2, 20214 yr 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
February 2, 20214 yr Solution 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}}
February 8, 20214 yr Author 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, 20214 yr by Alfonso Moreno