Hello, I have a problem when I try to add a custom tree node in developer section. I'm using umbraco v4.11.06 and I created a custom project to add a custom tree in developer section. When I refresh the page, I don't see my custom tree.
In trees.config this is the line for my Custom Tree Node (It seems OK): <!-- Custom --> <add silent="false" initialize="true" sortOrder="7" alias="myAlias" application="developer" title="My Custom Tree" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" assembly="myCustomTree" type="loadMyCustomTree" action="" />
What's wrong? Any idea? Thank you in advance.
This is my class code.
using System.Text;
using umbraco.businesslogic;
using umbraco.cms.presentation.Trees;
namespace MyAliasAppTree
{
[Tree("developer", "myAlias", "My Custom Tree", ".sprTreeFolder", ".sprTreeFolder_o", "", false, true, 7)]
publicclassloadMyAlias : BaseTree
{
public loadClientTools(string application) : base(application)
{ }
protectedoverridevoid CreateRootNode(refXmlTreeNode rootNode)
{
rootNode.Icon = FolderIcon;
rootNode.OpenIcon = FolderIconOpen;
rootNode.NodeType = "init" + TreeAlias;
rootNode.NodeID = "init";
}
publicoverridevoid Render(refXmlTree tree)
{
var mct = XmlTreeNode.Create(this);
mct.Text = "My Custom Tree";
mct.Icon = "images/myCustomTree.gif";
mct.Action = "javascript:openMyCustomTree()";
// Add the node to the tree
tree.Add(mct);
}
publicoverridevoid RenderJS(refStringBuilder Javascript)
{
Javascript.Append(@" function openMyCustomTree() { parent.right.document.location.href = 'plugins/MyCustomProject/myPage.aspx'; } ");
}
}
}
Problems when create custom tree node
Hello,
I have a problem when I try to add a custom tree node in developer section.
I'm using umbraco v4.11.06 and I created a custom project to add a custom tree in developer section.
When I refresh the page, I don't see my custom tree.
In trees.config this is the line for my Custom Tree Node (It seems OK):
<!-- Custom -->
<add silent="false" initialize="true" sortOrder="7" alias="myAlias" application="developer" title="My Custom Tree" iconClosed=".sprTreeFolder" iconOpen=".sprTreeFolder_o" assembly="myCustomTree" type="loadMyCustomTree" action="" />
What's wrong? Any idea? Thank you in advance.
This is my class code.
In your config file the type doesn't match the type in the code example.
Type should be "MyAliasAppTree.loadMyAlias"
Dave
is working on a reply...