None
None

Reputation: 5670

Run a macro when node is published in umbraco

I need to run one of my macro when a page is published. I there any way to do this in umbraco

Upvotes: 1

Views: 307

Answers (1)

Martijn van der Put
Martijn van der Put

Reputation: 4092

There are some events you can hook into. In your case you might use the Document_AfterPublish() event.

    static void Document_AfterPublish(Document sender,
 umbraco.cms.businesslogic.PublishEventArgs e)
            {
                // your code
            }

    // hook into the event
    Document.AfterPublish += 
                       new Document.PublishEventHandler(Document_AfterPublish);

Also look at this and this links which could be helpful.

Upvotes: 2

Related Questions