Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • aaeda 117 posts 150 karma points
    Apr 14, 2012 @ 10:58
    aaeda
    0

    Creating a custom control tree in umbraco

    Hi

    I am creating a new Custom Tree, but nothing is being displayed. I have added a new icon on the dashboard that displays well and also modified the lang xml file. I am using the following code fo rmy tree view.

    Namespace umb_terraintranet

     

        Public MustInherit Class survey : Inherits BaseTree

            Public Sub New(application As String)

                MyBase.New(application)

            End Sub

     

            Protected Overrides Sub CreateRootNode(ByRef rootNode As XmlTreeNode)

     

                rootNode.Icon = FolderIcon

                rootNode.OpenIcon = FolderIconOpen

                rootNode.NodeType = TreeAlias

                rootNode.NodeID = "init"

     

            End Sub

     

            Public Overrides Sub Render(ByRef tree As XmlTree)

     

                Dim sendInvitation = XmlTreeNode.Create(Me)

                sendInvitation.Text = "Send Invitation"

                sendInvitation.Icon = "docPic.gif"

                sendInvitation.Action = "javascript:openSendInvitation()"

                tree.Add(sendInvitation)

     

                Dim listInvitation = XmlTreeNode.Create(Me)

                listInvitation.Text = "List Invitation"

                listInvitation.Icon = "docPic.gif"

                listInvitation.Action = "javascript:openListInvitation()"

                tree.Add(listInvitation)

     

            End Sub

     

            Public Overrides Sub RenderJS(ByRef Javascript As StringBuilder)

     

                Javascript.Append("function openSendInvitation() {parent.right.document.location.href = 'survey/sendInvitation.aspx';")

     

                Javascript.Append("function openListInvitation() {parent.right.document.location.href = 'survey/sendInvitation.aspx';")

     

            End Sub

     

        End Class

    End Namespace

    I get no error message but no tree view is appearing. I have copied the dll in the bin folder of umbraco installation and also created a sub folder under the umbraco folder.

    Thanks

    Regards

    Aaeda

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Apr 15, 2012 @ 13:08
    Jeroen Breuer
    0

    Did you update the umbracoAppTree? See this example for more info: http://www.geckonewmedia.com/blog/2009/8/3/how-to-create-a-custom-section-in-umbraco-4

    Jeroen

  • aaeda 117 posts 150 karma points
    Apr 16, 2012 @ 07:32
    aaeda
    0

    Hi Jeroen

    Yes I did. In fact that's the exmaple I followed to do the custom tree . 

Please Sign in or register to post replies

Write your reply to:

Draft