add-items-to-navbar,... help me?

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
lramirez
Veteran Member
Posts: 47
Joined: 2019-11-01 23:23

add-items-to-navbar,... help me?

Post by lramirez » 2023-08-26 23:49

Good morning... forum
I want to place a button for a personalized access in the menu bar.

I have tried to make the guide of:
https://appgini.bizzworxx.de/products/j ... to-navbar/
...but it does not work. (I have the AppGiniHelper.min.js)

Can anyone help me or know how I can do this?
In the attached image you can see an example of what I want to do.
If anyone knows... or give me a guide...

thanks
Attachments
button.png
button.png (54.7 KiB) Viewed 3320 times
Luis Ramirez R.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1817
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: add-items-to-navbar,... help me?

Post by jsetzer » 2023-08-27 07:48

I have the AppGiniHelper.min.js
If you send your order number by email to [email protected] I can help you on custom navbar items within your support option.

Adding links and complete dropdown menus works just fine. If you have any red errors in console please fix them first.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1817
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: add-items-to-navbar,... help me?

Post by jsetzer » 2023-08-27 08:19

I have the AppGiniHelper.min.js
Here is an example for adding...
  1. a custom menu (dropdown) with menu-items and dividers (lines)
  2. a simple link
  3. a simple link with icon
...to NavBar using AppGini Helper Javascript Library (* commercial, I am the author)

Code: Select all

<!-- file: hooks/header-extras.php -->
<!-- requires script-include of AppGiniHelper.min.js -->

<script>
    var navbar = AppGiniHelper.getNavbar();
    navbar
    	.fix()
    	.addLink("Information", "my-url-.php")
	.addLink("Information+Icon", "my-url-.php", "info-sign");

    var dd_neu = navbar.addDropdown("", "option-vertical");
    dd_neu.addLink("Aufgabe", "case_tasks_view.php?addNew_x=1", "plus");
    dd_neu.addLink("Notiz", "case_notes_view.php?addNew_x=1", "plus");
    dd_neu.addDivider();
    dd_neu.addLink("Fallakte", "cases_view.php?addNew_x=1", "plus");
    dd_neu.addDivider();
    dd_neu.addLink("Kalender", "calendar.php", "calendar");
    dd_neu.addDivider();
    dd_neu.addLink("Benutzerdefinierte Felder", "customfields.php", "pencil");
</script>
chrome_HWaHRQevhF.png
chrome_HWaHRQevhF.png (58.21 KiB) Viewed 3303 times
Hope, this helps you and others.

PS: Older versions of the lib require var navbar = AppGiniHelper.common.getNavbar(); for getting the handle-variable.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

lramirez
Veteran Member
Posts: 47
Joined: 2019-11-01 23:23

Re: add-items-to-navbar,... help me?

Post by lramirez » 2023-08-27 19:17

excellent... jsetzer
excellent...
It works very well
thank you so much
Luis Ramirez R.

xbox2007
Veteran Member
Posts: 136
Joined: 2016-12-16 16:49

Re: add-items-to-navbar,... help me?

Post by xbox2007 » 2023-11-03 16:42

hello

i use this code to mane new menu and button to my project
ttt.jpg
ttt.jpg (9.79 KiB) Viewed 2793 times
after code in footer-extras.php
tttt.jpg
tttt.jpg (12.01 KiB) Viewed 2793 times

Code: Select all

<script>
	$j(function(){
		$j('.btn-import-csv').parent().prepend('<li class="dropdown" style="display: none;"><a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">New List<b class="caret"></b></a><ul class="dropdown-menu" role="menu"><li><a href="https://www.google.com"><img src="table.gif" height="32"> Google </a></li><li><a href="https://forums.appgini.com/"><img src="table.gif" height="32"> AppGini forums</a></li></ul></li>'); 
	});
	
	$j(function(){
		$j('.btn-import-csv').parent().prepend('<a class="btn-lg navbar-btn btn-success" href="#"><b> New Button : </b></a>');
	});
	
</script>


User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1817
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: add-items-to-navbar,... help me?

Post by jsetzer » 2023-11-03 23:37

lramirez wrote:
2023-08-27 19:17
excellent... jsetzer
excellent...
It works very well
thank you so much
Great! Happy it works for you!
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply