Back to feed

Forum marker variables not displaying right

Korok · 5 months ago · 3 replies · 395

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:

3 replies
Korok OP · 5 months ago

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.

Cedric · 5 months ago

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

Cedric · 5 months ago

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.

Create a free account to join the conversation.
Sign up free
ForumSpark © 2023 - 2026 · ForumSpark.net · Terms