1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Is there a conditional for unread content in nodes?

Discussion in 'Styling and Customization Questions' started by Ingenious, Feb 28, 2014.

  1. Ingenious

    Ingenious Well-Known Member

    I'm looking at replacing the read/unread node icons with fancy ones that look the same regardless of whether the user has read/unread content in them. However I would like an option to still show if there are unread posts, maybe a star or graphical icon, but only for logged in users (it's pointless for guests as it will always show).

    I'm OK with the conditional to only do something for logged in users, but is there a conditional I can use in the node list for whether there are unread posts?

    So in english, for each node:

    Is the user logged in? If so, is there unread content here? If so, display this graphic.

    Thanks :)
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    See example in this template:

    Admin CP -> Appearance -> Templates -> node_forum_level_2

    Code:
    <div class="nodeInfo forumNodeInfo primaryContent {xen:if $forum.hasNew, 'unread'}">
    
     
    rafass likes this.
  3. Ingenious

    Ingenious Well-Known Member

    Thanks @Jake Bunce - works a treat using that conditional along with another to make sure the user is logged in :)
     

Share This Page