Jump to content
TNG Community
matvernier

Disabling Menus for Mobile

Recommended Posts

matvernier

I have disabled the display of menus on my site by changing Setup >> Configuration >> General Settings  >> Site Design and Definition - Menu Location to "Do not display" and it works like a charm. However, when viewing my site on a Mobile device, the menus are still there. What else should I do to make sure the menus do not display on Mobile devices also. Thank you.
P.S. I use Template 13 with version TNG 12.1.0.

Share this post


Link to post
Share on other sites
tngrlkrz

Not the answer you want, if you're referring to the right most icons on the mobile top menu bar. Regardless of the selected template, you will still see icons for those functions there, even with the mobile site enhancement mod.  Perhaps someone knows of a mod avoid this, otherwise it requires a modification.

 

Share this post


Link to post
Share on other sites
bhemph

It looks like this is a bug. In the file genlib.php the following line should be inserted at line 802 in the mobileicons function, just before it starts adding the menus:

if($tngconfig['menu'] < 2) {

Then the if needs to be closed with a   }   after line 837, just before it calls the language menu.

If you are not comfortable doing this yourself, or making a mod to do it; contact Darrin directly telling him about the bug and include a link to this thread so he can see the solution and get you an updated file.  Even if you are comfortable with making the edit let Darrin know, so he can fix the file in an update.

Brent

 

Edited by bhemph
Contact Darrin either way, so he knows to fix it.

Share this post


Link to post
Share on other sites
tngrlkrz

Good catch Brent.   I just tested your changes in a 'clean' TNG12.1 sandbox and they do what matvernier is asking for and I agree this is a bug for Darrin to fix.  I also tested it with Ken Roy's Mobile_Site_Enhancements mod and it works there as well w/o further changes.

 

Share this post


Link to post
Share on other sites
matvernier

Thank you Brent and Ron.
I am not a programmer so I would not know how to make a mod but I can probably try to apply your work around suggestion.
I have never posted a bug before.
I will write to Darrin and add this thread.
Thank you again.

Share this post


Link to post
Share on other sites
Darrin Lythgoe

The "Do not display" option was not intended to apply to the mobile interface, but you can certainly make the changes Brent recommends if you want to see that behavior. I think navigation would be severely hampered though.

Share this post


Link to post
Share on other sites
cfj

Because I use WordPress, I don't want or need the mobile menu to display on mobile devices, so I had to comment out sitever mobile around line 170 in genlib.php

	/*if($sitever == "mobile") {
		if(!isset($flags['nomobile']) || !$flags['nomobile']) {
			$icons = tng_mobileicons($title);
			$icons .= "<div id=\"mcontent\">\n";
		}
		echo "<style>\n{$tngconfig['mmenustyle']}</style>\n";
	}
*/

 

Share this post


Link to post
Share on other sites
tngrlkrz
9 hours ago, Darrin Lythgoe said:

I think navigation would be severely hampered though.

After a bit more testing with the menu removed from Mobile, I tend to agree with Darrin that getting around TNG would become very  limited. The user would have to return to the homepage to find additional TNG links.   Perhaps the reason the option is there is because some of the templates offer additional menu menu links , such as the topmenu heading, and the "do not display" option gives a way for 'standard' mode devices (only) not to have redundant links. Template 3 is an example. 

 

Share this post


Link to post
Share on other sites
tngrlkrz
10 hours ago, matvernier said:

Thank you Brent and Ron.
I am not a programmer so I would not know how to make a mod but I can probably try to apply your work around suggestion.
I have never posted a bug before.
I will write to Darrin and add this thread.
Thank you again.

Since Darrin has approved, it you still wish to do this via a mod, let me know.

Share this post


Link to post
Share on other sites
matvernier

Thank you Ron for offering to make a mod with this. I have modified the code manually but a mod would be neat. If you were to create such a mod, I would be able to see it and maybe learn how to make my own from what you would have created.
André

Share this post


Link to post
Share on other sites
tngrlkrz

Glad that Brent was able to help you out

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×