XF 1.5 Applying a .class on a custom div when a subforum has a new msg

Wyvh

Member
Greetings again :>
Title says it all: i'd like to apply a .class to a custom div when one of its subforums has a new/unread message.

Any idea ?
Thanks.
 
I use something like this to display a custom icon in the template node_forum_level_n, maybe this works for you
Code:
<div class="{xen:if $forum.hasNew, 'Unread', 'Read'}"></div>
 
where is the div located?
If you give more details maybe we can give a better support

Here's the code :

<div id="tabscont" class="tabs_container">
<a rel="nodetab_1" class="nodetabs tabs_1">1</a>
<a rel="nodetab_9" class="nodetabs tabs_2">2</a>

</div>

<xen:include template="tabs.js" />

<xen:container var="$head.canonical"><link rel="canonical" href="{xen:link 'canonical:forums'}" /></xen:container>
<xen:if is="{$xenOptions.boardDescription}"><xen:container var="$head.description">
<meta name="description" content="{$xenOptions.boardDescription}" /></xen:container></xen:if>
<xen:container var="$head.openGraph">
<xen:include template="open_graph_meta">
<xen:set var="$url">{xen:link 'canonical:forums'}</xen:set>
<xen:set var="$title">{$xenOptions.boardTitle}</xen:set>
<xen:set var="$description">{$xenOptions.boardDescription}</xen:set>
<xen:set var="$ogType">website</xen:set>
</xen:include></xen:container>

<xen:hook name="forum_list_nodes">
<xen:if is="{$renderedNodes}"><xen:include template="node_list" /></xen:if>
</xen:hook>

The red lines are the custom divs. Example: If there's a new message in any subforum of the first category, it would add class X to
<a rel="nodetab_1" class="nodetabs tabs_1">1</a>.
 
Top Bottom