XF 1.5 How Can I Access/Edit $alert.template ?

king8084

Well-known member
Licensed customer
Template 'account_alerts_popup' houses what's returned in the user's alerts message. Per that template, it's stored strictly in $alert.template

I'd like to strip out some of what's in what's presented. In particular, remove the hyperlink to the user who triggered the alert (imo, that's an accidental click and people just want to be taken to their alert).

Per the following thread, I've taken a look at Account.php, however, it's unclear from here where the return value in actionAlertsPopup() is generated. Pardon my lack of php knowledge --i'm learning.

https://xenforo.com/community/threads/render-alerts.56734/

Thanks.
 
The template varies by alert type and action, ie alert_post_like etc. Each of these templates would need to be edited individually to remove the link.
 
The template varies by alert type and action, ie alert_post_like etc. Each of these templates would need to be edited individually to remove the link.
i'm fine with doing the individuals. any idea where they're housed?
 
I'm not trolling. The alert templates are located in the exact same place you found 'account_alerts_popup':

screenshot-MHKem0.webp
 
fyi, rather than editing all of the templates, i handled it via a single line of css:

Code:
.alertsPopup .listItemText a.username.subject {
  pointer-events: none;
}
 
Back
Top Bottom