how to change view, edit tabs url or add tabs if not there

drupal_developer's picture

garland theme:
just after
<?php print $breadcrumb; ?> in page.tpl.php file in garland theme add the following code :
<?php include_once('_tabs.php');?>
place this _tabs.php in the same folder where page.tpl.php file is
and in _tabs.php

<?php
$nid = arg(1);
$node = node_load($nid);
if ($node->type == "page") {
if (!$tabs) {
$url = $node->path ? $node->path : 'node/'.$nid;
$view = l('View', $url);
$edit = l('Edit', 'node/'.$nid.'/edit');
$tabs = "<li class='active'>$view</li><li>$edit</li>";
}
}
?>

 

Free Web Hosting
v>