XF 2.0 Tags on Thread List?

DL6

Well-known member
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.png
 
Last edited:

haqzore

Active member
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}">
 
Top