Finally, i got around to searching though the source code for DNN 7 to find the required code in the DNN source.
For anyone who might be interested, I created class to retrieve the menu details, please see below.
I excluded most of the settings but it gives me what i need.
Steve
//******************************************************
public class MyMenu: DotNetNuke.Web.DDRMenu.ModuleBase
{
public static int GetNavNodeOptions(bool includeHidden)
{
return (int)DotNetNuke.UI.Navigation.NavNodeOptions.IncludeSiblings + (int)DotNetNuke.UI.Navigation.NavNodeOptions.IncludeSelf +
(includeHidden ? (int)DotNetNuke.UI.Navigation.NavNodeOptions.IncludeHiddenNodes : 0);
}
public DotNetNuke.Web.DDRMenu.MenuNode GetMenu(EventArgs e)
{
DotNetNuke.Web.DDRMenu.MenuNode rootNode = null;
using (new DotNetNuke.Web.DDRMenu.DNNCommon.DNNContext(this))
{
try
{
base.OnPreRender(e);
//var menuStyle = GetStringSetting("MenuStyle");
//if (String.IsNullOrEmpty(menuStyle))
//{
// rootNode = null;
// return rootNode;
//}
var menuSettings = new DotNetNuke.Web.DDRMenu.Settings
{
MenuStyle = "", //GetStringSetting("MenuStyle"),
NodeXmlPath = "", //GetStringSetting("NodeXmlPath"),
NodeSelector = "", //GetStringSetting("NodeSelector"),
IncludeContext = false, //GetBoolSetting("IncludeContext"),
IncludeHidden = false, //GetBoolSetting("IncludeHidden"),
IncludeNodes = "", //GetStringSetting("IncludeNodes"),
ExcludeNodes = "", //GetStringSetting("ExcludeNodes"),
NodeManipulator = "", //GetStringSetting("NodeManipulator"),
//TemplateArguments =
// DotNetNuke.Web.DDRMenu.Settings.TemplateArgumentsFromSettingString(GetStringSetting("TemplateArguments")),
//ClientOptions =
// DotNetNuke.Web.DDRMenu.Settings.ClientOptionsFromSettingString(GetStringSetting("ClientOptions"))
};
rootNode =
new DotNetNuke.Web.DDRMenu.MenuNode(
DotNetNuke.Web.DDRMenu.Localisation.Localiser.LocaliseDNNNodeCollection(
DotNetNuke.UI.Navigation.GetNavigationNodes(
ClientID,
DotNetNuke.UI.Navigation.ToolTipSource.None,
-1,
-1,
GetNavNodeOptions(menuSettings.IncludeHidden))));
}
catch (Exception Ex)
{
}
return rootNode;
}
}
}
There were some additional references required for example: DotNetNuke.Web.DDRMenu
Maybe some other references are also required, i can't remember now exactly which one i added, but visual studio will point that out.