convert template (_tp) to object id