add master-detail template