Reputation: 5670
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
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