Foren

Start Liferay 7 with slide out menu always closed

thumbnail
William Gosse, geändert vor 6 Jahren.

Start Liferay 7 with slide out menu always closed

Liferay Master Beiträge: 533 Beitrittsdatum: 04.07.10 Neueste Beiträge
Is there away to have the slide menus in liferay 7 closed when the user first logs in? It seems that the menus will be open if the user leave the session with them in that state.
thumbnail
David H Nebinger, geändert vor 6 Jahren.

RE: Start Liferay 7 with slide out menu always closed

Liferay Legend Beiträge: 14915 Beitrittsdatum: 02.09.06 Neueste Beiträge
I believe they are controlled by browser-side cookies...

That said, it's not a big deal to close them again. Personally I like that they are always open because I'm usually head-first into the control panel after login.
thumbnail
William Gosse, geändert vor 6 Jahren.

RE: Start Liferay 7 with slide out menu always closed

Liferay Master Beiträge: 533 Beitrittsdatum: 04.07.10 Neueste Beiträge
Thanks David. I was hoping there was a property I could set. Have it in the open position is not always good for us in certain situation and themes.
thumbnail
William Gosse, geändert vor 6 Jahren.

RE: Start Liferay 7 with slide out menu always closed

Liferay Master Beiträge: 533 Beitrittsdatum: 04.07.10 Neueste Beiträge
This is definitely not being controlled by a cookie.
thumbnail
William Gosse, geändert vor 6 Jahren.

RE: Start Liferay 7 with slide out menu always closed (Antwort)

Liferay Master Beiträge: 533 Beitrittsdatum: 04.07.10 Neueste Beiträge
I kind of figure out how to control this in the theme using a combination of Liferay functions, Freemarker and some CSS:
<#if permissionChecker.isOmniadmin()>
	<@liferay.control_menu />
	<#assign wrapperStyle = "" />
<#else>
	<#assign wrapperStyle = "style='margin-top: 5px !important; padding-left: 0px !important'" />
	<style>
		#ControlMenu {display: none !important;}
		#_com_liferay_product_navigation_product_menu_web_portlet_ProductMenuPortlet_sidenavSliderId {display: none !important;}
	</style>
<!--#if-->