XF 2.0 Public Navigation parameters(Callback)

XenConcept

Well-known member
Licensed customer
What are the expected parameters?
 

Attachments

  • AXwzpd_ORKKNfyBbLQIB6Q.webp
    AXwzpd_ORKKNfyBbLQIB6Q.webp
    12.8 KB · Views: 85
I would like to know the same thing. Are there any examples @Chris D ?

Hello,

here is an example

PHP:
 public static function test(array $navData, $context, $selected)
    {
        $params = [
            'title' => \XF::phrase('nav.test'),
            'href' => \XF::app()->router()->buildLink('test'),
            'counter' => 1,
            'icon' => 'fa-'

        ];

        return $params;
    }
 
Ok question, how does $selected work. How would the new tab be selected from a custom template? Does it depend at all on the Context value when defining the navigation callback?
 
Back
Top Bottom