Not a developer? Go to



This callback is invoked whenever a user applies a template set to their blog. It is not invoked when a user is refreshing an existing template set. This callback can be used for example to populate the blog with sample content appropriate for the related template set (e.g. an “About” page, or a “Contact Me” page).

Input Parameters

  • $cb - a reference to the current MT::Callback object handling this event.
  • $params - a hash ref containing information about the blog to which the template set is being applied.

The following are the keys of the parameter ($params) hash passed into the handler as input:

  • blog - a reference to MT::Blog object whose template set was just changed.

Return Value


Example Handler

sub handler {
    my ($cb, $params) = @_;
    my $set = $param->{blog}->template_set || '';
    # do something