Add split template function.