Page 1 of 1

navLinks, whats the limit?

Posted: 2018-05-11 05:34
by Jay Webb
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.

Re: navLinks, whats the limit?

Posted: 2018-05-11 06:15
by pbottcher
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
	    );
	}

Re: navLinks, whats the limit?

Posted: 2018-05-11 15:07
by Jay Webb
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.

Re: navLinks, whats the limit?

Posted: 2018-05-11 17:58
by pbottcher
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 4828 times

Re: navLinks, whats the limit?

Posted: 2018-05-11 19:01
by Jay Webb
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.

Re: navLinks, whats the limit?

Posted: 2018-05-11 20:57
by pbottcher
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.

Re: navLinks, whats the limit?

Posted: 2018-05-11 21:50
by Jay Webb
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.

Re: navLinks, whats the limit?

Posted: 2018-05-11 23:35
by Jay Webb
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...

Re: navLinks, whats the limit?

Posted: 2018-05-12 08:20
by pbottcher
Good to see that you have the solution.