Not a developer? Go to MovableType.com

Documentation

init_request

The init_request callback is invoked just prior to a mode handler being processed, but after all the other information has been marshaled. It can be used to inspect and/or modify a request prior processing or rendering any HTML to the browser. One use case in which it has been commonly used is to modify the templates used to render the application, as is done in the iPhone plugin for Movable Type which will use a different set of templates based upon the user agent (the text string transmitted by the browser identifying the client software by name, e.g. “Firefox”).

Input Parameters

  • $cb - a reference to the current MT::Callback object handling this event.
  • $app - a reference to the MT::App::CMS object processing this request.

Return Value

None.

Example Handler

sub init_request_handler {
    my ($cb, $app) = @_;
    # do something
}
Back