XF 2.0 Tags on Thread List?

Open template thread_list_macros and add this below line 28
HTML:
                    <xf:if is="$thread.tags">
                        <li>
                            <i class="fa fa-tags" aria-hidden="true" title="{{ phrase('tags')|for_attr }}"></i>
                            <span class="u-srOnly">{{ phrase('tags') }}</span>
                                <xf:foreach loop="$thread.tags" value="$tag">
                                    <a href="{{ link('tags', $tag) }}" class="tagItem" dir="auto">{$tag.tag}</a>
                                </xf:foreach>
                        </li>
                    </xf:if>
and save the changes
1509730161299.webp
 
Last edited:
FYI to any finding/trying this.
@MarkFL was able to get this working for me in 2.1.9 via the below:



MarkFL said:
To get it to work on my local dev site (with a custom style) I had to add this code:

HTML:
                    <xf:if is="$thread.tags">
                        <li style="height: 1px;">
                            <i class="fa fa-tags" aria-hidden="true" title="{{ phrase('tags')|for_attr }}"></i>
                            <span class="u-srOnly">{{ phrase('tags') }}</span>
                            <xf:foreach loop="$thread.tags" value="$tag">
                                <a href="{{ link('tags', $tag) }}" class="tagItem" dir="auto">{$tag.tag}</a>
                            </xf:foreach>
                        </li>
                    </xf:if>

Directly above the line that reads:

HTML:
                    <xf:if is="{$showWatched} AND {$xf.visitor.user_id}">
 
I ended up buying the Tag Essentials add-on which provides the tags on thread list functionality (among many features) and works correctly. It's pricey if you need just that one feature, but it works.

 
me too, if i can i try this code too. But sems have not a good support for mobile, right?... and what on Xen 2.2?
There are reasons why certain elements do not appear on the mobile version pages: on the one hand this means that they are not overloaded too much and on the other hand, and above all, these small elements are difficult to click on a smartphone and Google penalize websites for accessibility and therefore the Page Speed score is impacted.

XenForo rarely does things randomly...
 
I don't think so. Like exposing prefixes, you can expose tags (no more than 1). Tags and prefixes are clickable and show their own search index. So if it's true that performance is affected by possible exposed tags, then it should be for all prefixes as well.
 
It's not false, they remain clickable like the prefixes (which are significantly larger) but they could be qualified as too close together and therefore impact the score.

But probably it's not a game changer...

1676286897979.webp
 
Open template thread_list_macros and add this below line 28
HTML:
                    <xf:if is="$thread.tags">
                        <li>
                            <i class="fa fa-tags" aria-hidden="true" title="{{ phrase('tags')|for_attr }}"></i>
                            <span class="u-srOnly">{{ phrase('tags') }}</span>
                                <xf:foreach loop="$thread.tags" value="$tag">
                                    <a href="{{ link('tags', $tag) }}" class="tagItem" dir="auto">{$tag.tag}</a>
                                </xf:foreach>
                        </li>
                    </xf:if>
and save the changes
View attachment 161187

Not work with beta 6 :confused:
 
Back
Top Bottom