Displaying tags in thread list.

haqzore

Devotee
Joined
Dec 6, 2012
Messages
2,654
Hey all.

I'm following these directions:

But getting no results. I do use a custom theme - is that possibly why?

I have asked on the theme developers forums a few days ago... but no reply yet.
 

MarkFL

La Villa Strangiato
Joined
Jul 3, 2017
Messages
1,245
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}">
 

haqzore

Devotee
Joined
Dec 6, 2012
Messages
2,654
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}">
Worked perfectly. Thanks!
 

haqzore

Devotee
Joined
Dec 6, 2012
Messages
2,654
Any ideas on how to avoid this overlapping?

Example attached.
 

Attachments

  • Screenshot_20200621-115804_Chrome.jpg
    Screenshot_20200621-115804_Chrome.jpg
    454.3 KB · Views: 17

MarkFL

La Villa Strangiato
Joined
Jul 3, 2017
Messages
1,245
Oddly enough, I'm not getting that issue, the thread title breaks around the tags:

taz_tagsinlisting.png
 

haqzore

Devotee
Joined
Dec 6, 2012
Messages
2,654
Oddly enough, I'm not getting that issue, the thread title breaks around the tags:

View attachment 54540
It is odd, because even in my own screenshot, the thread directly under the overlap issue has proper multiple lines. ? ?‍♂️


And the bottom thread in my example even pushes the topic title entirely to a new line...
 

MarkFL

La Villa Strangiato
Joined
Jul 3, 2017
Messages
1,245
It is odd, because even in my own screenshot, the thread directly under the overlap issue has proper multiple lines. ? ?‍♂️


And the bottom thread in my example even pushes the topic title entirely to a new line...

Yes, I did notice other topics were breaking correctly in your screenshot after I made my post above. If you wish to send me a link privately to the page where that's happening, I'd be glad to take a look and see if I can come up with a solution.
 

haqzore

Devotee
Joined
Dec 6, 2012
Messages
2,654
Yes, I did notice other topics were breaking correctly in your screenshot after I made my post above. If you wish to send me a link privately to the page where that's happening, I'd be glad to take a look and see if I can come up with a solution.
Appreciate it. Will do.
 
Top