Register
Login
 

Support House of Nuke

  

 House of Nuke Forums  
Subject: Dynamic Menu Context
Prev Next
You are not authorized to post a reply.

Author Messages
Jason GrigsbyUser is Offline
Novice
Novice
Posts:1

01/22/2009 1:28 AM Alert 

Hi everyone.

Thanks for providing HouseMenu. As someone new to DNN, I was very happy to find a menu alternative that output basic lists.

I originally started out using the 1.x skin object instead of the 2.x branch of the menu because the 1.x version was referenced in the DNN Skinning book.

Unfortunately, I finally gave up on 1.x because of the problems in IE with "false" showing up in flyout pull down menus. This problem was remedied by moving to 2.x.

Now I've got a new problem. In 1.x I was using the following code to make sure that the scope of the menu was restricted to the root parent and its children:

uc1:HouseMenu runat="server" id="HouseMenu2" RootDepth="1" Scope="%=PortalSettings.ActiveTab.BreadCrumbs(0).TabID%&" ShowAdmin="True" IsRecursive="True"

(Note: I'm having a lot of trouble getting less than and greater than signs in the post. My code has those characters both surrounding the outer code as well as surrounding the %=PortalSettings....% section)

This was working perfectly in 1.x, but similar code in 2.x causes errors.

dnn:NAV runat="server" id="dnnNAV" ProviderName="HouseMenuNavigationProvider"
customattributes
    dnn:CustomAttribute Name="Scope" Value="%=PortalSettings.ActiveTab.BreadCrumbs(0).TabID%" /
    dnn:CustomAttribute Name="MaxDepth" Value="5" /
    dnn:CustomAttribute Name="RootDepth" Value="1" /
    dnn:CustomAttribute Name="MenuClientId" Value="RightNavMenu" /
/customattributes
/dnn:NAV

The error is:

DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object.

My suspicion is that the custom attribute is expecting an integer or string and no longer handling the TabID object. I've tried using cINT and other mechanism to change the type, but so far am having no luck.

Unfortunately, as someone fairly new to DNN and ASP (but very familiar with PHP and Python), I'm feel like I'm floundering the dark a bit here.

Any help on how to accomplish what I'm trying to do here would be greatly appreciated.

Thank You!

greg ordUser is Offline
Novice
Novice
Posts:2

03/26/2009 11:41 AM Alert 
I just pulled this off by adding this script to teh page:

<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


Dim NameBox As NavObjectBase = Me.FindControl("NAV1")
Dim attribute As CustomAttribute = New CustomAttribute
attribute.Name = "Scope"
attribute.Value = PortalSettings.ActiveTab.BreadCrumbs(0).TabID()
NameBox.CustomAttributes.Add(attribute)


End Sub
</script>

You are not authorized to post a reply.
Forums > House Modules > HouseMenu 2.x > Dynamic Menu Context



ActiveForums 3.6
  

Terms Of Use  |  Privacy Statement
Copyright © 2006-2008 by Avastone Technologies. All rights reserved.