Get grouping options from group_config and add separation of grouping condition and group order.
Added support for default group if the parameter is not given.
Grouping defaults to asc order.