This is my first post so bare with me. I got this thing going: After i publish a node in the tree i want to change its icon. I wrote a class that implements ApplicationBase and added a BeforePublish event handler.
public AppBase() { Document.BeforePublish += DocumentBeforePublish;
}
private static void DocumentBeforePublish(Document sender, PublishEventArgs e) { Node n = new Node(sender.Id);
Changing the ICON after publish
Hey all,
This is my first post so bare with me. I got this thing going: After i publish a node in the tree i want to change its icon. I wrote a class that implements ApplicationBase and added a BeforePublish event handler.
public AppBase()
{
Document.BeforePublish += DocumentBeforePublish;
}
private static void DocumentBeforePublish(Document sender, PublishEventArgs e)
{
Node n = new Node(sender.Id);
sender.Image = "userType.gif";
sender.getProperty("---").Value = sender.Image;
}
I can see the property value being changed but the Node icon is still the same. Can anyone direct me to the solution?
Thankx
Alin,
you would need to subscribe to the BeforeNodeRender/AfterNodeRender event to change the node's icon.
Cheers,
/Dirk
Yeah... so far i got. i got problems doing it :). Thankx for at leat asuring me that is what i got to do.
Can i get some snippet as help ?
Thx
is working on a reply...