23576 Posts in 19403 Topics by 2893 members
|Go to End|
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.
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.
|Go to Top|