Using the PHP functions LBWeb::header or LBWeb::pagestart, it is possible to add a customized navigation bar to your plugin. The navigration bar can be used for internal and external links, and also can show notification bullets. With the navigation bar it is very easy to split up settings to multiple pages.
You can use the integrated navbar feature, or can customize your own code. Both ways use the variable $navbar.
Multidimension Array ($navbar)
In your code create a variable called $navbar and customize the elements of your navigation bar. This must be done before you call LBWeb::pagestart or LBWeb::lbheader.
The numbers define the ordering of your menu elements. They don't need to be continuously (it is possible to use 10, 20, 30 to keep space for new elements).
The NavBar can integrate notification bullets. What it does, you can see in the Updates system widget: It displays the notifications for new available versions in the menu "LoxBerry Update", and newly installed versions in "LoxBerry Update History".
Here is the example code:
If you omit the Notify_Name parameter, all notifications of your plugin are counted.
|Name||The text that is displayed (multilingual labels may use $L['YOUR.LANGSTRING_FROM_TRANSLATION'])|
|URL||An internal or external URL to use, e.g. a link to your second settings page, or to the LoxWiki.|
|target||The link target. (HTML target= tag). If omitted, it is opened in the same window, or use "_blank" to open a new window|
If it is True, that button is highlighted (see screenshot above)
The active element must be set to True, otherwise the button is not highlighted.
This defines that the notification bullets should be shown on that tab.
Notify_Package usually is $lbphomedir or the constant LBPHOMEDIR
Defines/filters the notification by the notification name.
If you provide a Notify_Package but no Notify_Name, all notifications for your plugin are counted.
Using a HTML string ($navbar)
In that case you define the $navbar code yourself. If $navbar is a string (not an array), the template system will completely take your code and pastes it on top of the template.
The NavBar code looks somehow like this:
Of cource, the notification bullets are not shown in that NavBar.