How to remove AppGini 25.13 -- Vertical navigation bar

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
chewliew
Posts: 7
Joined: 2025-05-12 13:12

How to remove AppGini 25.13 -- Vertical navigation bar

Post by chewliew » 2025-08-30 03:54

Dear Sir,

The new AppGini 25.13 released have this Vertical navigation bar.
How to remove that REMOVE the navigation bar?

In my app, I am actually hiding all the tables from the user's dashboards.
Reason being I do not want them to see ANY tables in SQL, and mess around with the values of the records.
I only limit users to see certain fields and allow them to edit/update those fields, all other fields are hidden from users for security and data consistency reasons

Please let me know how to remove that REMOVE the navigation bar.

Thanks.

Best regards,

Liew

chewliew
Posts: 7
Joined: 2025-05-12 13:12

Re: How to remove AppGini 25.13 -- Vertical navigation bar

Post by chewliew » 2025-08-31 03:35

I found this line in header.php,

<?php echo VerticalNav::html(); ?>

Removed this line and the vertical navigation bar will go away.
However, this header.php is auto generate every time we generate AppGini.

Anyone know a better way to do this?

Best regards,

Liew

saymaad
AppGini Super Hero
AppGini Super Hero
Posts: 59
Joined: 2024-06-03 16:17

Re: How to remove AppGini 25.13 -- Vertical navigation bar

Post by saymaad » 2025-09-01 09:28

1. Set Navigation Preference in Project Settings
In AppGini 25.13, there's a built-in option to set the default navigation menu orientation. You can do this via:
AppGini > Project > Properties > Application Appearance > Default Navigation Menu Orientation > Horizontal
default-nav-menu-option.png
default-nav-menu-option.png (20.84 KiB) Viewed 83 times
This ensures that your application default to the horizontal menu and users have an option to switch to the vertical navigation if they prefer, which might align more closely with your desire to hide the vertical nav.

2. Force Horizontal Menu via Code
To enforce the default globally, add the following line to hooks/__bootstrap.php:

Code: Select all

@define('DEFAULT_NAV_MENU', 'horizontal');
This sets the default menu layout for all users similar to the above, without regenerating your app and retaining user preference for vertical nav.

3. Hide User's Ability to Change Menu Layout (Optional)
If you don't want users to switch to the vertical menu via their profile page (membership_profile.php), you can hide the toggle buttons using jQuery.

Add the following to hooks/header-extras.php (this is refered at all times unlike the footer-extras.php if my memory serves me well):

Code: Select all

<?php if (basename($_SERVER['PHP_SELF']) == 'membership_profile.php') : ?>
	<script>
		$j(() => {
			$j('#nav-menu').remove();
		});
	</script>
<?php endif; ?>
This will remove the button group that lets users toggle between horizontal and vertical menu layouts on their profile page.

Post Reply