Forum marker variables not displaying right

Korok's Avatar
Korok · in Support
3 replies 221 views

Hello!

Sorry, I have a second question. The new forum marker variables aren't displaying for me correctly. I'm not sure if I'm using them right. I want to use the font-awesome ones. I suspect I'm using it incorrectly. This is what I have:

  <div class="forum-marker">
     {{ forum.marker_icon }}
  </div>

I've tried all of these ones:

{{ forum.marker_type }}
{{ forum.marker_icon }}
{{ forum.marker_read_icon }}
{{ forum.marker_unread_icon }},

They preview as words like this:

0

I posted two supports at once a few days ago, so I figured I'd check in to make sure this one didn't get missed. c:

No rush, though. Please take the time you need.

0

I’ll have a look today and see what seems to be the issue. 😊

0

Right, sorry for the long wait.

those variables hold the Font Awesome class string (e.g. fa-solid fa-battery-three-quarters), not rendered HTML. That's why printing them shows the words.

Wrap them in an <i> tag:

<div class="forum-marker">
    <i class="{{ forum.marker_icon }}"></i>
</div>


forum.marker_icon automatically resolves to marker_read_icon or marker_unread_icon based on the forum's read state. Note: only free fa icons work here. Not the pro versions.

Theme: FS 2.0
Create Your Community with ForumSpark

ForumSpark is a modern community platform built on custom software. It combines the familiar feel of classic forums with a fast, simple experience designed for today’s communities.