Set partitioner by variable in template