OnPublish?

Vote:
 
I would like to know how and where to put code that should trigger when a page is published.
#23798
Sep 16, 2008 16:13
Vote:
 

Hello Johan,

Ruwen made a post about determining if its a new page or and update when lisening to the publish event. Could check it out here.

#23815
Sep 17, 2008 8:27
Vote:
 

You need to add an event handler to handle the On publish page event for the EPiSever

In your page initializer add

DataFactory.Instance.PublishedPage += new PageEventHandler(Instance_PublishedPage); 

This will create a handler as below

 void Instance_PublishedPage(object sender, PageEventArgs e)

    {
	//put your code here
    }

 

#23816
Sep 17, 2008 8:34
Vote:
 
It´s working fine. Thanks to Petter and Alok Smile
#23820
Sep 17, 2008 10:22