Pages events

The following articles describes the events exposed by pages in Sitefinity.

IUnauthorizedPageAccessEvent

This interface is implemented by all events which fire when a page in the site is accessed by an unauthorized user. There's only one such built-in event, but you should always subscribe using the interface rather than the class that implements it. Use the following code to subscribe.

In the event handler, you can access the following information:

  • The HTTP Context for the page which was accessed.
  • The PageSiteNode object for the page itself.
  • The redirect strategy used.
  • The URL to which the user was redirected.

IPagePreRenderCompleteEvent

An interface of the event notifying that a page's PreRender event has completed.
The event is raised at 'PreRenderComplete' event of ASP.NET page lifecycle. A subscription for this event can be created by using the EventHub. Use the following code to subscribe:

In the event handler, you can access the following information:

  • The PageSiteNode object for the page itself
  • The Page itself

Personalized pages events

IPersonalizedWidgetRenderEvent 

If the visitors browsing the page are associated with certain audience segments and in case the page has personalized versions of widgets created for these specific segments, the IPersonalizedWidgetRenderEvent is fired. The event is fired for each personalized widget.

Since there is just one such built-in event, you always subscribe using the interface rather than the class that implements it. Use the following code to subscribe:

In the event handler, you can access the following information:

  • Segment name
  • Widget ID
  • Page URL
  • Origin from where the event is fired

Was this article helpful?

Next article

Profile events