Drupal: Type Of Current Node
This article would tell you how get know type of a current node (a node that is displayed). Editing form has no info about this.
Solutions:
- Block with РНР code that shows node type
- Nodetype module
Block with РНР code that shows node type
Create a block with input format – РНР and set this code to block body:
<?php
if (arg(0)==’node’ && is_numeric(arg(1))) {
$node = node_load(arg(1));
echo ‘Тип текущей ноды: ‘. $node->type;
}
?>
Block visibility: “Show on all pages except listed”, because the block will be shown on node pages only – this is defined in the code.
It would be better to show the block to site administrator only – specify the required role.
Nodetype module
You can install Nodetype module which will allow you to change node type.
Page for node editing will contain drop-down list (select box) with node types. Current node type will be the default type.