Wyvh Member Aug 20, 2017 #1 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.
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.
DL6 Well-known member Aug 21, 2017 #2 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> Upvote 0 Downvote
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>
Wyvh Member Aug 21, 2017 #3 Thanks for your reply DL6. I think this won't work since the custom div that needs the .class is outside the category. :/ Upvote 0 Downvote
Thanks for your reply DL6. I think this won't work since the custom div that needs the .class is outside the category. :/
DL6 Well-known member Aug 21, 2017 #4 Wyvh said: Thanks for your reply DL6. I think this won't work since the custom div that needs the .class is outside the category. :/ Click to expand... where is the div located? If you give more details maybe we can give a better support Upvote 0 Downvote
Wyvh said: Thanks for your reply DL6. I think this won't work since the custom div that needs the .class is outside the category. :/ Click to expand... where is the div located? If you give more details maybe we can give a better support
Wyvh Member Aug 21, 2017 #5 DL6 said: where is the div located? If you give more details maybe we can give a better support Click to expand... 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> Click to expand... 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>. Upvote 0 Downvote
DL6 said: where is the div located? If you give more details maybe we can give a better support Click to expand... 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> Click to expand... 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>.