Sitecore provides two pipeline hooks for tapping into an
Action method at point of execution:
These follow standard MVC naming conventions –
actionExecuting fires before your Action method executes, and
actionExecuted fires afterwards.
A process hooking into actionExecuting looks something like this:
At this point, it might be useful to get some information about the
Action we’re executing, or the Controller it belongs to. Sitecore allows us to access the MVC
ControllerDescriptor objects, which contain plenty of information about our
The last line is commented out, as executing the action from within itself may cause the universe to implode. Maybe.