Copied to clipboard

Flag this post as spam?

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


  • Alin Parjolea 7 posts 27 karma points
    Feb 01, 2010 @ 14:41
    Alin Parjolea
    0

    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

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Feb 01, 2010 @ 15:06
    Dirk De Grave
    0

    Alin,

    you would need to subscribe to the BeforeNodeRender/AfterNodeRender event to change the node's icon.

     

    Cheers,

    /Dirk

  • Alin Parjolea 7 posts 27 karma points
    Feb 01, 2010 @ 15:11
    Alin Parjolea
    0

    Yeah... so far i got. i got problems doing it :). Thankx for at leat asuring me that is what i got to do.

  • Alin Parjolea 7 posts 27 karma points
    Feb 01, 2010 @ 15:28
    Alin Parjolea
    0

    Can i get some snippet as help ?

     

    Thx

  • 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.

Please Sign in or register to post replies