Disable Hamburger Menu

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
Aenigmaticus
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Sun Mar 19, 2017 7:29 am

Disable Hamburger Menu

Post by Aenigmaticus » Sun Mar 19, 2017 8:00 am

Well, I've reached a stumbling block: I cannot find the option to disable the 'hamburger menu' presentation on my 'mainmenu'. I am using the stock 'protostar' theme. How can I disable it so that the links are present independent of device/browser size?

I need consistency: 'Home' | 'About' | 'Forum' | 'Wiki'. Not a so-called collapsing menu that forces one to use javascript and waste power on a mobile device and waste huge amount of pixel space on a browser. Note that the links do appear properly when I have my desktop browser in full screen.

I'm sure I'm missing something obvious in the admin control... older documentation suggests the option exists! Can you please help me out with this?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27296
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Disable Hamburger Menu

Post by Per Yngve Berg » Sun Mar 19, 2017 10:09 am

Put the Menu in Position-8 or modify the code in the Template for Position-1

Aenigmaticus
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Sun Mar 19, 2017 7:29 am

Re: Disable Hamburger Menu

Post by Aenigmaticus » Sun Mar 19, 2017 5:29 pm

Position-8 shifts the menus to the left column in the "Content" section, which is not wanted; I can't make sense of what protostar's entries mean even through a night's worth of trial-and-error, so I removed the entire Position-1 code and replaced it with hardcoded links.

At least THAT works, albeit needs some simple CSS cleanup (At least I can keep it down to just 4 css entries: a.menuitem, a.menutitem:link, a.menuitem:hover, and a.menuitem:visited, in a custom .css file). Of course, when I create a page/embed content , like 'Home'/'About'/'Forum'/'Wiki'/'Store', I get the joys of adjusting hardcoded values on file on a production server instead of the CMS Admin Panel. In other words, I had no choice but to murder the dynamic Menu layout controls in the Admin Panel to get rid of the Hamburger Menu. Serves only for 'aliasing' now.

(this all assumes that there is no '.menuitem' defined before hand, or another can of worms just got opened...)

I thought I hated Hamburger Menus before...

Aenigmaticus
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Sun Mar 19, 2017 7:29 am

Re: Disable Hamburger Menu

Post by Aenigmaticus » Sun Mar 19, 2017 5:50 pm

Recommendation: Add a boolean checkbox under 'Admin Panel -> Menus -> {_menu_name_} -> Edit -> Collapse to Hamburger.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27296
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Disable Hamburger Menu

Post by Per Yngve Berg » Sun Mar 19, 2017 7:09 pm

Remove the code I have commented out:

Code: Select all

		<?php if ($this->countModules('position-1')) : ?>
				<nav class="navigation" role="navigation">
					<div class="navbar pull-left">
//						<a class="btn btn-navbar collapsed" data-toggle="collapse" data-target=".nav-collapse">
//							<span class="icon-bar"></span>
//							<span class="icon-bar"></span>
//							<span class="icon-bar"></span>
//						</a>
					</div>
//					<div class="nav-collapse"> */
						<jdoc:include type="modules" name="position-1" style="none" />
//					</div> 
				</nav>
			<?php endif; ?>
The documentation for Bootstrap: http://getbootstrap.com/2.3.2/component ... ttonGroups

Aenigmaticus
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Sun Mar 19, 2017 7:29 am

Re: Disable Hamburger Menu

Post by Aenigmaticus » Sun Mar 19, 2017 8:48 pm

Excellent! Thank you!

Now I need to figure out how to enforce horizontal only... this is to say, like the Hamburger Menu, the list turns in to a vertical stack. I'm sure its a matter of adjusting the CSS now, except the sheer size of the file makes it problematic to identify where the switch is. There IS a mentioning of 'static' in the Admin Panel with respect to the Menu, so I'll go find it and give it another try in the mean time now that the Hamburger is gone.

Edit: it looks like I have to adjust more code, as it had no effect.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27296
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Disable Hamburger Menu

Post by Per Yngve Berg » Mon Mar 20, 2017 8:24 pm

Enter " navbar-nav nav-pills" as Menu Class Suffix on the Module.

Aenigmaticus
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Sun Mar 19, 2017 7:29 am

Re: Disable Hamburger Menu

Post by Aenigmaticus » Wed Mar 22, 2017 2:10 pm

Unfortunately changing the Menu Class Suffix from " nav-pills" to " navbar-nav nav-pills" didn't change the end result. Thank you for your help; I've chosen a different approach - I've been planning on creating a custom template, this has prorated it. You can find my article in the Template section on this forum board.


Locked

Return to “General Questions/New to Joomla! 3.x”