navLinks, whats the limit?

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
Jay Webb
Veteran Member
Posts: 80
Joined: 2017-08-26 15:27
Contact:

navLinks, whats the limit?

Post by Jay Webb » 2018-05-11 05:34

AppGini 5.70

Is there a limit to how many navLinks per table group in the "links-navmenu.php"
I have 3 Table Groups.
Table Group 0, has 5, I added and 4 by appgini, for a total of 9.
Table Group 1, has 6, I added and 4 by appgini, for a total of 10. (need 2 more in this group but they wont add) for a total of 12.
Table Group 2, has 4, I added and 1 by appgini, for a total of 5

I know the links are good, I tried them both in Table Group 2, and they showed up.
So it would appear 10 is a default max number of links per table group in links-navmenu.
I have looked everywhere to increase but no luck.
Anyone have idea how to increase.
What we envision, we make happen.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: navLinks, whats the limit?

Post by pbottcher » 2018-05-11 06:15

Hi,

I tested this on my system and I did not see a limit there. Added 49 items + 9 items from AppGini without issue.

Just try this

Code: Select all

	for ($i=1; $i<50; $i++) {
  	   $navLinks[] = array(
		'url' => '#', 
		'title' => 'Navl-Link '.$i, 
		'groups' => array('*'), // groups allowed to see this link, use '*' if you want to show the link to all groups
		'icon' => 'table.gif',
		'table_group' => 0, // optional index of table group, default is 0
	    );
	}
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
Jay Webb
Veteran Member
Posts: 80
Joined: 2017-08-26 15:27
Contact:

Re: navLinks, whats the limit?

Post by Jay Webb » 2018-05-11 15:07

Hello Pascal

Thanks for responding,
I added suggested text to table_group 0, got one Nav-Link 1,
I the added it to table_group 1, got nothing,
I added it to table_group 2, and got Nav-Link 1-5, but nothing past 10 total.
Cleared browser cache Chrome, tried Safari and Firefox, no change.
Somewhere limit is set to 10.
I'm running test system on a MAMP localhost.
What we envision, we make happen.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: navLinks, whats the limit?

Post by pbottcher » 2018-05-11 17:58

Hi,

this is more than strange. I can put it in either group an it works without limits. Can you try just the above code? Are you modifing anything with the nav-links afterwards?
nav-links.JPG
nav-links.JPG (17.7 KiB) Viewed 3609 times
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
Jay Webb
Veteran Member
Posts: 80
Joined: 2017-08-26 15:27
Contact:

Re: navLinks, whats the limit?

Post by Jay Webb » 2018-05-11 19:01

Hi,

I made a new links-navmenu.php in hooks folder with nothing in it but,

Code: Select all

<?php
for ($i=1; $i<50; $i++) {
     $navLinks[] = array(
  'url' => '#',
  'title' => 'Navl-Link '.$i,
  'groups' => array('*'), // groups allowed to see this link, use '*' if you want to show the link to all groups
  'icon' => 'table.gif',
  'table_group' => 0, // optional index of table group, default is 0
    );
}
and same results, I get Nav-Link 1 - 6 and that's it.
What we envision, we make happen.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: navLinks, whats the limit?

Post by pbottcher » 2018-05-11 20:57

Hi, this is realy strange.

Can you create a file "trace-nav.php" in the root folder of your project and add the following code:

Code: Select all

<?php
include("./settings-manager.php");
detect_config();
migrate_config();
$_SESSION['adminUsername']='test';
include("./config.php");
include("./db.php");
include("./ci_input.php");
include("./datalist.php");
include("./incCommon.php");
include("./admin/incFunctions.php");
	@include_once("./hooks/__global.php");
	@include_once("./hooks/links-navmenu.php");
global $navLinks;
var_dump($navLinks);
echo NavMenus();

?>
Then call the file directly through the web-browser. It might throw some errors, but it would be interessting so see the result. You should see the array with the nav-links on top and the menu structur at the bottom. Maybe you can post it here.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
Jay Webb
Veteran Member
Posts: 80
Joined: 2017-08-26 15:27
Contact:

Re: navLinks, whats the limit?

Post by Jay Webb » 2018-05-11 21:50

Hello,

Well, made the file, ran it, got no errors, there is 49 links in table_group 0.
See file results here https://drive.google.com/file/d/1cVKtes ... sp=sharing
think this should work.
What we envision, we make happen.

User avatar
Jay Webb
Veteran Member
Posts: 80
Joined: 2017-08-26 15:27
Contact:

Re: navLinks, whats the limit?

Post by Jay Webb » 2018-05-11 23:35

Hey, Pascal

Found the problem it's in "dynamic.css.php" line 55
.navbar ul.dropdown-menu {
max-height: 400px;
overflow-y: auto;
}

I changed, overflow-y: scroll; and I can see all 49 links with scrollbar, I could also change, max-height: 600px; and also see all links,
so the issue wasn't there was a limit but max-height was to small and scroll was not working for max height;

So new setting is;

.navbar ul.dropdown-menu {
max-height: 600px;
overflow-y: scroll;
}
and all is good. I always forget to look into this file.
Thanks...
What we envision, we make happen.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: navLinks, whats the limit?

Post by pbottcher » 2018-05-12 08:20

Good to see that you have the solution.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply