-
Notifications
You must be signed in to change notification settings - Fork 9
En dev listing callbacks
semuel edited this page Jan 4, 2012
·
2 revisions
The list_template_param callback will be called just before building the list template, similar to template_param
for the common template.
sub list_template_param_foo {
my $cb = shift;
my ( $app, $param, $tmpl ) = @_;
# Do something
}
- $app
- An instance of the MT::App.
- $param
- A hash reference of parameters that is passed to build the template.
- $tmpl
-
MT::Template
object to build the template.
This callback does not require a return value.
The cms_pre_load_filtered_list callback will be called just before loading the object when the list is requested.
sub cms_pre_load_filtered_list_foo {
my $cb = shift;
my ( $app, $filter, $options, $cols ) = @_;
# Do something
}
- $app
- An instance of the MT::App class.
- $filter
- An instance of the MT::Filter class.
- $options
- A hash reference of the current filter that includes
$terms
. - $cols
- An array reference of the list of requested columns.
This callback does not require a return value.
The cms_filtered_list_param callback will be called just before rendering the generated list.
sub cms_filtered_list_param_foo {
my $cb = shift;
my ( $app, $res, $objs ) = @_;
# Do something
}
- $app
- An instance of the MT::App class.
- $res
- An array reference of the matched objects that were modified for rendering.
- $objs
- An array reference of the matched objects.
This callback does not require a return value.