Best method of changing content of one field based on whether another exists
look in to https://api.drupal.org/api/drupal/modules%21node%21node.api.php/function/hook_node_view/7.x

In Drupal 7 yes you can do this in the template file for the content type, -> unless you are changing themes lots perhaps the "custom logic" in the  theme file is the quickest win.