21277 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 813 Views |
-
Menu groupings or Menu items with no link?

9 April 2010 at 2:30am Last edited: 9 April 2010 8:12pm
This is a realistic scenario. Is it possible to create menu items that have no link or content?
This type of item is often used with JS to mouse over to reveal a second level menu items without being a link to any content in the CMS but may require class so that an <a> tag (with response none) can be added with JS to enable keyboard navigation for tabbing in the menu to work.
It is also used to simply group menu options and should have the option to include or not include <a> tag.
If not what is the best work around?
If I am not explaining this very well the modified example attached may clear things up.

-
Re: Menu groupings or Menu items with no link?

11 April 2010 at 1:18pm
What I normally do to get this working is use a RedirectorPage to group the entries then in the template if the classname is a RedirectorPage then don't include the link. The RedirectorPage can link off to either the homepage or another page (I use it as its included by default and won't leave random pages on the site).
<% control Children %>
<% if ClassName = RedirectorPage %>$MenuTitle<% else %><a href="$Link">$MenuTitle</a><% end_if %>
<% end_control %>Or you could group the pages under the redirectorpage.
| 813 Views | ||
|
Page:
1
|
Go to Top |


