Need navigation bar/menu/links

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
amphetamine
Posts: 98
Joined: 05 Jun 2019, 00:17

Need navigation bar/menu/links

Post by amphetamine »

LINKS.png
LINKS.png (11.6 KiB) Viewed 2777 times
How to input links out there? buttons, navigation menu or any kinds of method to add quick links/bookmarks?
cas
Posts: 1050
Joined: 11 Mar 2006, 16:08
Contact:

Re: Need navigation bar/menu/links

Post by cas »

this is managed within core/layout_api.php. The buttons are controlled with function layout_navbar_button_bar().
For as far as I know, there is no function to add links there so you would need to adjust that function to show more options.
amphetamine
Posts: 98
Joined: 05 Jun 2019, 00:17

Re: Need navigation bar/menu/links

Post by amphetamine »

is there any examples I can follow?
cas
Posts: 1050
Joined: 11 Mar 2006, 16:08
Contact:

Re: Need navigation bar/menu/links

Post by cas »

This is really simple, here we go.
Open up layout_api.php (in the core directory)
Go to line 557 (this is with version 2.21)
You should be within the function called: function layout_navbar_button_bar()
just before this line :

Code: Select all

	if( $t_show_report_bug_button )  { 
insert the following code:

Code: Select all

		echo '<a class="btn btn-primary btn-sm" href="http://www.nuy.info"  target="_blank" >';
		echo '<i class="fa fa-edit"></i> ' . "Nuy.info";
		echo '</a>';
Save these changes and you will find another button, navigating to my site.
Clearly not the best option to change core programs. You could request if a default event can be placed there so it could be managed with a plugin. :mrgreen:
amphetamine
Posts: 98
Joined: 05 Jun 2019, 00:17

Re: Need navigation bar/menu/links

Post by amphetamine »

thank you so much!
Post Reply