XF 1.2 Trying to display members online in a custom template


Active member
Hello all.

I am working on a project for a client and am trying to display both 'Members Online Now' and 'Total Members' inside a new template.

This template is being included inside the 'header' template.

I've grabbed the following code from the 'forum_list' and 'sidebar_online_users' templates respectively:

1. <dl class="memberCount"><dt>Members:</dt><dd>{xen:number $boardTotals.users}</dd></dl>
2. {xen:phrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}

My best assumption is that $boardTotals.users and $onlineUsers.members isn't available to use in this template. Could there possibly be a way to grab these variables using <xen:container>?

Thanks in advance!