Split template in chunks