I'm trying to customize my DNN Menu a bit through code (As I want my Products tab to be populated full of the Categories in my shop stored in my database dynamically at run-time)
Here's how my code looks:
using MenuNode = DotNetNuke.Web.DDRMenu.MenuNode;
public class MyModule : INodeManipulator
public List<MenuNode> ManipulateNodes(List<MenuNode> ddrNodes, PortalSettings portalSettings)
MenuNode mn = new MenuNode();
mn.Text = "Google9";
mn.Url = "www.google.com";
// ddrNodes.Clear(); // Removes all nodes present (by default DotNetNuke Tabs)
ddrNodes.Add(mn); // Or any other properties, note some like First/Last etc are automatic
As you can see, my code at the moment is extremely simple as I'm just trying to get a working example going at the moment... However, it's not working, haha.
It adds my custom menu item to my menu no problem, but when I click on the new menu item I don't get redirected.
If I look into the code behind the generated menu item it's href is set to "#", so for some reason it appears to be forgetting that I assigned it a redirect URL in the code...
Any assistance would be greatly appreciated :D