XF 2.2 Remove "mark read" toggle from Alerts Menu


Active member
We want to remove the "mark read" icon toggle when hovering over the alert in the Alerts menu.

Is the proper way to do so by going to the alert_macros template and removing this class:
js-alertToggle alertToggler
                    <a href="{{ link('account/alert-toggle', null, {'alert_id': $alert.alert_id}) }}"
                        data-xf-init="tooltip" data-content="{{ $alert.isUnreadInUi() ? phrase('mark_read')|for_attr : phrase('mark_unread')|for_attr }}"
                        data-read="{{ phrase('mark_read')|for_attr }}" data-unread="{{ phrase('mark_unread')|for_attr }}"
                        class="js-alertToggle alertToggler"><xf:trim>
                        <xf:fa icon="fa-circle" class="alertToggler-icon" />

Also, what's the reasoning there is a toggle for this?

I would just hide it with CSS:

There's plenty of uses for it. Here's one example - You message me happy birthday and I see it but don't have time to respond right now. I know I want to thank you later but don't want to forget so I just mark the alert unread.
Top Bottom