Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I added a custom section in umbraco admin side and its showing the node twice.
Here is my assembly code:
namespace MyCustomAssemblyGallery
{
/// <summary>
/// Summary description for GalleryHandlers
/// </summary>
public class GalleryHandlers : BaseTree
public GalleryHandlers(string application)
: base(application)
{ }
protected override void CreateRootNode(ref XmlTreeNode rootNode)
rootNode.Icon = FolderIcon;
rootNode.OpenIcon = FolderIconOpen;
rootNode.NodeType = "init" + TreeAlias;
rootNode.NodeID = "init";
}
public override void Render(ref XmlTree Tree)
// Create tree node to allow viewing previously sent newsletters
var GalCat = XmlTreeNode.Create(this);
GalCat.NodeID = "uniqueMngCat";
GalCat.Text = "Manage Category";
GalCat.Icon = "docPic.gif";
GalCat.Action = "javascript:openGalleryCategory()";
GalCat.Menu = null;
// Add the node to the tree
Tree.Add(GalCat);
var GalAlbum = XmlTreeNode.Create(this);
GalAlbum.NodeID = "uniqueMngAlbums";
GalAlbum.Text = "Manage Albums";
GalAlbum.Icon = "docPic.gif";
GalAlbum.Action = "javascript:openGalleryAlbums()";
GalAlbum.Menu = null;
Tree.Add(GalAlbum);
var GalPhoto = XmlTreeNode.Create(this);
GalPhoto.NodeID = "uniqueMngPhotos";
GalPhoto.Text = "Manage Photos";
GalPhoto.Icon = "docPic.gif";
GalPhoto.Action = "javascript:openGalleryPhotos()";
GalPhoto.Menu = null;
Tree.Add(GalPhoto);
public override void RenderJS(ref StringBuilder Javascript)
Javascript.Append(@"
function openGalleryCategory() {
parent.right.document.location.href = 'gallery/Category-list.aspx';
");
function openGalleryAlbums() {
parent.right.document.location.href = 'gallery/Gallery-list.aspx';
function openGalleryPhotos() {
parent.right.document.location.href = 'gallery/GalleryPhotos-list.aspx';
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom section showing same node twice
I added a custom section in umbraco admin side and its showing the node twice.
Here is my assembly code:
namespace MyCustomAssemblyGallery
{
/// <summary>
/// Summary description for GalleryHandlers
/// </summary>
public class GalleryHandlers : BaseTree
{
public GalleryHandlers(string application)
: base(application)
{ }
protected override void CreateRootNode(ref XmlTreeNode rootNode)
{
rootNode.Icon = FolderIcon;
rootNode.OpenIcon = FolderIconOpen;
rootNode.NodeType = "init" + TreeAlias;
rootNode.NodeID = "init";
}
public override void Render(ref XmlTree Tree)
{
// Create tree node to allow viewing previously sent newsletters
var GalCat = XmlTreeNode.Create(this);
GalCat.NodeID = "uniqueMngCat";
GalCat.Text = "Manage Category";
GalCat.Icon = "docPic.gif";
GalCat.Action = "javascript:openGalleryCategory()";
GalCat.Menu = null;
// Add the node to the tree
Tree.Add(GalCat);
// Create tree node to allow viewing previously sent newsletters
var GalAlbum = XmlTreeNode.Create(this);
GalAlbum.NodeID = "uniqueMngAlbums";
GalAlbum.Text = "Manage Albums";
GalAlbum.Icon = "docPic.gif";
GalAlbum.Action = "javascript:openGalleryAlbums()";
GalAlbum.Menu = null;
// Add the node to the tree
Tree.Add(GalAlbum);
// Create tree node to allow viewing previously sent newsletters
var GalPhoto = XmlTreeNode.Create(this);
GalPhoto.NodeID = "uniqueMngPhotos";
GalPhoto.Text = "Manage Photos";
GalPhoto.Icon = "docPic.gif";
GalPhoto.Action = "javascript:openGalleryPhotos()";
GalPhoto.Menu = null;
// Add the node to the tree
Tree.Add(GalPhoto);
}
public override void RenderJS(ref StringBuilder Javascript)
{
Javascript.Append(@"
function openGalleryCategory() {
parent.right.document.location.href = 'gallery/Category-list.aspx';
}
");
Javascript.Append(@"
function openGalleryAlbums() {
parent.right.document.location.href = 'gallery/Gallery-list.aspx';
}
");
Javascript.Append(@"
function openGalleryPhotos() {
parent.right.document.location.href = 'gallery/GalleryPhotos-list.aspx';
}
");
}
}
}
is working on a reply...