The problem is: I successfully added the Backoffice icon to the tray, but when I click on it no nodes are added for the .aspx page I created. Here's the code I used:
Imports umbraco.cms.presentation.Trees
Imports System.Text
Public Class CustomTree
Inherits BaseTree
Public Sub New(ByVal application As String)
MyBase.New(application)
End Sub
Protected Overrides Sub CreateRootNode(ByRef rootNode As XmlTreeNode)
rootNode.Icon = FolderIcon
rootNode.OpenIcon = FolderIconOpen
rootNode.NodeType = ("init" & MyBase.TreeAlias)
rootNode.NodeID = "init"
End Sub
Public Overrides Sub Render(ByRef tree As XmlTree)
Dim newNode As XmlTreeNode
' Create tree node to allow sending a newsletter
newNode = XmlTreeNode.Create(Me)
newNode.Text = "Polls" newNode.Icon = "statistik.gif"
newNode.Action = "javascript:openPolls()"
' Add the node to the tree
tree.Add(newNode)
End Sub
Public Overrides Sub RenderJS(ByRef javascript As StringBuilder)
javascript.Append("function openPolls() { parent.right.document.location.href = '/backend/PollsList.aspx'; } ") End Sub
End Class
I added the following values to the UmbracoApp table:
Gave permission to the user to see the "backoffice" icon on the tray. I can see the icon but when I click on it only the node "Backoffice" is visible but I have no node "Polls". What can be the problem here?
Adding a tray icon - problem
Hello, I'm trying to add a custom tray icon for a backoffice. My project is in VB and I followed this tutorial:
http://www.geckonewmedia.com/blog/2009/8/3/how-to-create-a-custom-section-in-umbraco-4
The problem is: I successfully added the Backoffice icon to the tray, but when I click on it no nodes are added for the .aspx page I created. Here's the code I used:
Imports umbraco.cms.presentation.Trees Imports System.Text Public Class CustomTree Inherits BaseTree Public Sub New(ByVal application As String) MyBase.New(application) End Sub Protected Overrides Sub CreateRootNode(ByRef rootNode As XmlTreeNode) rootNode.Icon = FolderIcon rootNode.OpenIcon = FolderIconOpen rootNode.NodeType = ("init" & MyBase.TreeAlias) rootNode.NodeID = "init" End Sub Public Overrides Sub Render(ByRef tree As XmlTree) Dim newNode As XmlTreeNode ' Create tree node to allow sending a newsletter newNode = XmlTreeNode.Create(Me) newNode.Text = "Polls"newNode.Icon = "statistik.gif" newNode.Action = "javascript:openPolls()" ' Add the node to the tree tree.Add(newNode) End Sub Public Overrides Sub RenderJS(ByRef javascript As StringBuilder) javascript.Append("function openPolls() { parent.right.document.location.href = '/backend/PollsList.aspx'; } ")
End Sub End Class
I added the following values to the UmbracoApp table:
And to the UmbracoAppTree:
Gave permission to the user to see the "backoffice" icon on the tray. I can see the icon but when I click on it only the node "Backoffice" is visible but I have no node "Polls". What can be the problem here?
Thanks in advance
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.