Dynamic template loading for different blocks