<& '/widgets/search/search.mc', object => 'category', field => 'uri', type => 'singular', use_form_tag => 0 &>

<& '/widgets/listManager/listManager.mc', object => 'category', title => 'Publish a Category', select => $select, fields => [qw(uri)], addition => '', profile => undef, exclude => $exclude, behavior => 'expand', &>

<%init> <%once> my $widget = 'desk_asset'; my $select = sub { my $cat = shift; my $cat_id = $cat->get_id; return [['Stories', 'bulk_publish|publish_categories_cb', "story=$cat_id"], ['Media', 'bulk_publish|publish_categories_cb', "media=$cat_id"]]; }; # exclude categories that aren't in the current site my $exclude = sub { my $site_id = $c->get_user_cx(get_user_id()); my $cat = shift; return $cat->get_site_id != $site_id; };