Merriet Jerry in Drupal Bangalore
Opensource, CMS, PHP, MySql, Drupal, Frameworks
Wednesday, December 29, 2010
Get content type using node id
if (
arg
(
0
) ==
'node'
&&
is_numeric
(
arg
(
1
))) {
$nid
=
arg
(
1
);
$node
=
node_load
(array(
'nid'
=>
$nid
));
$type
=
$node
->
type
;
}
Newer Post
Older Post
Home