DNNSkin.Net Blog

Stay up to date with our most recent news and updates

DDRMenu user guide

DDRMenu user guide

Oct 28 2013

The original url:  DDRMenu token templates

This guide explains the basic usage of DDRMenu. For details on options etc, please refer to the reference guide.

How to install the core menu»

If you are running DotNetNuke 6, then DDRMenu will already be installed and you need do nothing unless you want to upgrade DDRMenu without upgrading your whole site.

For earlier versions (DotNetNuke 4.5 to 5.6):

  • Download the relevant installation package from http://dnnddrmenu.codeplex.com/.
  • Install the module in the host Module Definitions page.
  • Note that as well as installing the menu code, this should also add the following entry to the navigationControl providers in your web.config:
    type="DotNetNuke.Web.DDRMenu.DDRMenuNavigationProvider, DotNetNuke.Web.DDRMenu" />

    This entry should be removed if you uninstall DDRMenu.

With the core menu installed, you will have the DNNMenu and SolPart upgrade templates available, and also the DumpXML diagnostic template. For any other menu style you will also need to obtain a suitable template (from http://dnnddrmenutemplates.codeplex.com/ or elsewhere) or create your own.

How to set up a ready-made megamenu, treeview, accordion, etc»

First, download a suitable template (if you don't already have a template you can use one of the templates supplied with the DarkKnight skin, or one of the example templates at http://dnnddrmenutemplates.codeplex.com/). Drop the template folder into your skin folder (or portal root if you want the menu style available throughout a particular portal, or /DesktopModules/DDRMenu if you want the menu style available to the whole DNN instance).

Then add these two lines:
<%@ Register TagPrefix="ddr" TagName="MENU" src="~/DesktopModules/DDRMenu/Menu.ascx" %><%@ Register TagPrefix="ddr" Namespace="DotNetNuke.Web.DDRMenu.TemplateEngine" Assembly="DotNetNuke.Web.DDRMenu" %>
to the list of Register tags at the start of the skin's ASCX file, and the following skin object:
in the skin where you would like the menu to appear (where the MenuStyle parameter is the name of the menu template folder).

Note that while it is also possible to use a dnn:NAV control with the DDRMenuNavigationProvider and CustomAttributes to render a non-DNNMenu template, it adds complexity and brings no particular benefits, so is not recommended.

How to upgrade a version 1 DNNMenu»

Edit your skin's ASCX files and replace

How to upgrade a SolPart menu»

Edit your skin's ASCX files and replace
<%@ Register TagPrefix="dnn" TagName="..." src="~/Admin/Skins/SolPartMenu.ascx" %>
<%@ Register TagPrefix="dnn" TagName="..." src="~/DesktopModules/DDRMenu/SolPartMenu.ascx" %>

How to choose which pages to show in a menu»

If you don't want to show all the pages in your menu, you have a few options available to you. The most common way is to use the NodeSelector option. Use:

  • NodeSelector="RootOnly" to show only the root level menu items (alias for *,0,0)
  • NodeSelector="RootChildren" to show all the children of the root menu item that is the parent of the current page (alias for +0)
  • NodeSelector="CurrentChildren" to show the children of the current page (alias for .)
  • NodeSelector="pageID" to show the children of a specific page
  • NodeSelector="{root},{skip},{depth}" (where {skip} and {depth} may be omitted). {root} is * for the root, . or 0 for the current page, -n for n levels above the current page, +n for n levels down from the root menu towards the current page, PageID to select a particular page by ID or PageName to select a particular page by name. {skip} if provided skips that number of levels (e.g. 0 shows the selected page, 1 shows its children). {depth} if provided specifies the number of levels deep to go (e.g. 0 for just the current level, 1 to include immediate children).

You can also use the IncludeNodes and ExcludeNodes options. These are generally used in DNN 4 and 5 to create separate menus for Admin and Host. Use a comma separated list of page names, IDs or roles to include in the menu (top level only), e.g. IncludeNodes="Admin,Host" or ExcludeNodes="321,123". Wrap roles in [], e.g. [All users] shows only those pages visible to all users.

In DotNetNuke 6, you can specify IncludeHidden="true" to include hidden pages in the menu structure. This can be useful for creating separate menus to show site sections that are hidden from the main menu.

How to make localised menus»

In general, you don't need to do anything to have localised menus. If you're using DNN's built in localisation, or Ealo, Apollo or Adequation, then DDRMenu will detect and use them automatically. If you need to use localised strings in your template then use the GetString extension function in an XSLT template, and if you have another localisation provider then implement the ILocalisation interface in your localisation provider's controller.

How to build your own custom menu»

The best way to build a custom menu is to take an existing template as a starting point (there are some basic unordered list templates provided at http://dnnddrmenutemplates.codeplex.com/) and work from there. You can use the built-in DumpXML template at any time to view the actual live data structure that your template is using (just switch to MenuStyle="DumpXML"). See the pages on Token, XSLT and Razor templates for more information, and if you are building a menu that may need to work with several skins then also see the reference guide for details on how to include JavaScript and CSS files with the menu.

How to set options on a skin object»

Use the following format:

How to set options on a skin object»

Add the following to the list of Register tags at the top of your skin ASCX file:
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.Skins" Assembly="DotNetNuke" %>
Then use the following format:
Any option whose name is not recognised as a standard option will be set as a ClientOption.

How to set options on a menu added as a module»

Module options are set through the standard module settings. Template arguments and client options should be supplied as one or more lines in Setting=Value format.

Related content»


2013 Oct  297  4
2010 Jul  16298  8


Win the First DotNetNuke Design Challenge for 2010 "Modern Web Standards" category, you can check more detail here Download winning Skin here

Customize a personalized design for your business!

We can provide professional DotNetNuke skin design and the W3C compliant skin.
Make you 100% satisfaction, are the main characteristics of our work.

© 2006-2014 by DNNSkin.Net, Inc. All rights reserved. Terms Of Use Privacy Statement