Content type template only for viewing, not editing I've added a page template to override certain content types

function THEMENAME_preprocess_page(&amp;$variables) {
  if( !empty($variables['node']) ) {
    $variables['theme_hook_suggestions'][] = 'page__node__' . $variables['node']-&gt;type;
  }
}


This successfully uses page--node--vendor.tpl.php instead of page.tpl.php

The problem is that it is also using this template when editing the node, which looks rather silly. How can I modify this to only use the template when viewing content and not when editing?

** Yes, I do want Drupal to use this theme when creating/editing content, and not a separate admin theme.
This was the most convenient variable I found in the $variables array to check whether I was viewing or editing

function THEMENAME_preprocess_page(&amp;$variables) {
  $is_editing = isset($variables['page']['content']['system_main']['#node_edit_form']) &amp;&amp; $variables['page']['content']['system_main']['#node_edit_form'];

  if( !empty($variables['node']) &amp;&amp; !$is_editing ) {
    $variables['theme_hook_suggestions'][] = 'page__node__' . $variables['node']-&gt;type;
  }
}