blog_template_set_change

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

None.

Example Handler

sub handler {
    my ($cb, $params) = @_;
    my $set = $param->{blog}->template_set || '';
    # do something
}
This page was last updated on 2008-10-01, 17:03.

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.