NicolasZN
Well-known member
An add-on I'm working on has the following lines in it:
The xf:if statement I just added to try to hide the font awesome icons if there aren't unread alerts/conversations.
However, as a result, whenever I try to rebuild the add-on I'm receiving:
I know it's the xf:if statement, but am wondering if there's any way I can achieve what I'm trying to achieve with an acceptable child element?
Code:
<div class="block-body">
<xf:radiorow name="username">
<xf:foreach loop="$subAccounts" value="$user">
<xf:option value="{$user.username}" selected="{{ $username == $user.username }}">
{$user.username}
<xf:if is="{$user.conversations_unread}">
<i class="far fa-envelope"></i>
<span class="badgeContainer{{ $user.conversations_unread ? ' badgeContainer--highlighted' : '' }}"
data-badge="{{ $user.conversations_unread ? $user.conversations_unread|number : 0 }}" title="{{ phrase('conversations') }}">
</span>
</xf:if>
<xf:if is="{$user.alerts_unread}" />
<i class="far fa-bell"></i>
<span class="badgeContainer{{ $user.alerts_unread ? ' badgeContainer--highlighted' : '' }}"
data-badge="{{ $user.alerts_unread ? $user.alerts_unread|number : 0 }}" title="{{ phrase('alerts') }}">
</span>
</xf:if>
</xf:option>
</xf:foreach>
</xf:radiorow>
</div>
However, as a result, whenever I try to rebuild the add-on I'm receiving:
Code:
Option tag contains an unexpected child element. - Template name: public:template_name_here