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

XF 1.4 Staff Hierarchy?

Discussion in 'Styling and Customization Questions' started by Demon, Apr 7, 2015.

  1. Demon

    Demon Active Member

    Hello,

    In sidebar_online_users would this bit of code work for making the Staff Online Now hierarchy?
    Code:
    <!-- block: sidebar_online_staff -->
    <xen:if hascontent="true">
        <div class="section staffOnline avatarList">
            <div class="secondaryContent">
                <h3><a href="{xen:link members, '', 'type=staff'}">{xen:phrase staff_online_now}</a></h3>
                <ul>
                    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.is_admin}">
                                <li>
                                    <xen:avatar user="$user" size="s" img="true" />
                                    <xen:username user="$user" rich="true" />
                                    <div class="userTitle">{xen:helper userTitle, $user}</div>
                                </li>
                            </xen:if>
                           
                            <xen:if is="{$user.is_moderator}">
                                <li>
                                    <xen:avatar user="$user" size="s" img="true" />
                                    <xen:username user="$user" rich="true" />
                                    <div class="userTitle">{xen:helper userTitle, $user}</div>
                                </li>
                            </xen:if>
                        </xen:foreach>
                    </xen:contentcheck>
                </ul>
            </div>
        </div>
    </xen:if>
    <!-- end block: sidebar_online_staff -->
    
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Have you tried it?
     
  3. Demon

    Demon Active Member

    Yeah, I tried it. It turns out all it did is add that conditional statement to make moderators show on the list. Which is pointless because no templates need to be edited to show a certain usergrop on the list.
     

Share This Page