Hi,
I'm working on the userpanel template files and wanted to do something nice with the alerts you get.
So I've got the code nearly done but I need to add different CSS classes depending on if the user has an unread alert or not.
Here is a part of the code I used from the default template on XenForo;
So that would spit out the class "noalert" if unread is empty.
I want to add another class for if the user has an alert but I don't know the xen code enough to do it. I can do it fine in PHP
I'm working on the userpanel template files and wanted to do something nice with the alerts you get.
So I've got the code nearly done but I need to add different CSS classes depending on if the user has an unread alert or not.
Here is a part of the code I used from the default template on XenForo;
Code:
<a href="{xen:link account/alerts}" class="{xen:if {$visitor.alerts_unread}, '', 'noalert'}">
{xen:number $visitor.alerts_unread}
</a>
So that would spit out the class "noalert" if unread is empty.
I want to add another class for if the user has an alert but I don't know the xen code enough to do it. I can do it fine in PHP
PHP:
if($visitoralerts_unread != '0') {
echo 'alert';
}