def blosxom_truncate_list_handler(args):
    """If ``config["num_entries"]`` is not 0 and ``data["truncate"]``
    is not 0, then this truncates ``args["entry_list"]`` by
    ``config["num_entries"]``.

    :param args: args dict with ``request`` object and ``entry_list``
                 list of entries

    :returns: the truncated ``entry_list``.
    """
    request = args['request']
    data = request.get_data()
    config = request.get_configuration()

    num_entries = config['num_entries']
    if data.get('truncate', False) and num_entries:
        entrylist = args['entry_list'][:num_entries]
    return entrylist