How to hide Edit | View tabs?

aneuryzm picture aneuryzm · Aug 20, 2010 · Viewed 39.1k times · Source

Can I hide the

Edit | View

tabs on top of each node ?

I've searched for this option in theme settings (both global and standard theme but I couldn't find it).

I still want to be able my customer to edit / administer content, so I cannot just remove the permission for it.

thanks

Answer

ANDiTKO picture ANDiTKO · Jul 16, 2011

here is a very easy solution for you. (Drupal 7)

  • Open your page.tpl.php in your current template and search for the $tabs variable.

  • Remove the render code if you want to hide it completely.

  • If you want to display it only to administrators use this code

    <?php if ($tabs and $is_admin): ?>
    <div class="tabs">
      <?php print render($tabs); ?>
    </div>
    

    The above code checks if the user is administrator. If it is it will render the tabs. If not it wont render them.