Unclickable Menu Items

As of mojoPortal content management system version 2.3.5.1 we have added support to make unclickable menu items. This is useful mainly in dynamic menus where hovering opens the menu for child pages but you may want to make a parent page not clickable. Be careful with this, if you use it inappropriately it can be unfriendly to your users. 

For alternatives to unclickable menu items see How To Make Parent Page Link To a Child Page.

To enable un-clickable menu items, you need to add the property EnableNonClickablePageLinks on the StyleSheetCombiner in the layout.master file of your skin and set it to true.

<portal:StyleSheetCombiner id="StyleSheetCombiner" runat="server" JQueryUIThemeName="eggplant" UseIconsForAdminLinks="false" EnableNonClickablePageLinks="true" />

Once this is done, if you go to Page Settings of a page you will see a checkbox for "Is Clickable?", it is checked by default but if you un-check it, then the link for the page will be unclickable (at least if javascript is not disabled).

The way it works is that the menu will render the link with a CSS class "unclickable". The ScriptLoader control will detect this setting on the StyleSheetCombiner, and it will add jQuery javascript to make the links un-clickable like this:

$('a.unclickable').click(function(){ return false; });

Once you have made a page not clickable from the menu, the only way to get back to page settings for that page is to go to Administration > Add/Edit Pages, then select the page in the list to highlight it, then click the wrench icon to get to page settings for the page where you could make it clickable again.

Note that this is just a cosmetic effect using javascript, it does not absolutely keep people from getting to the unclickable page, it is not a security feature. If someone navigates directly to the url for the page or if they have javascript disabled they will see it. For this reason I would recommend that on the unclickable pages you enable the Child Pages Site Map so that if any visitors do happen to land there they just see another menu for the child pages.

Un-clickable Menu Items in TreeView based menus

In the past it was not possible to use unclickable menu items on TreeView menus such as the Site Map, but as of this version there is a new way to make it possible to have unclickable links on the Site Map or other TreeView Menus. Here I will explain how to do it on the Site Map page.

1. Go to Page Settings for the page that you want to be unclickable, and add a Custom Menu CSS Class as "unclickable". 

2. In your theme.skin file look for the entry for <portal:mojoTreeView runat="server" SkinID="SiteMapPage"

Add the following attributes to that entry and save the file:

UseMenuTooltipForCustomCss="true"
RenderCustomClassOnAnchor="true"

That should make the link unclickable on the Site Map.

Last Updated 2012-03-19 by Joe Audette