XF 2.0 Are Alert Bubbles still a thing in the navbar?

Jaxel

Well-known member
In XF1, we were able to add a "count" to each tab in the navbar through code. Is this still a thing?
 
If the nav entry data has a "counter", it will be used like that.
 
You would usually add it programmatically to the nav entry using the navigation_setup event using the counter value as described above.
 
You would usually add it programmatically to the nav entry using the navigation_setup event using the counter value as described above.
Of course. But I'm trying to do it manually first, just to make sure it works.

Any examples of a navigation setup event?
 
I got it... thanks.

Code:
<?php

namespace EWR\Rio\Listener;

class Navigation
{
    public static function setup(\XF\Pub\App $app, array &$navigationFlat, array &$navigationTree)
    {
        $navigationTree['EWRrio']['counter'] = 2;
    }
}
 
Back
Top Bottom