Closed (fixed)
Project:
Drupal core
Version:
7.0-alpha1
Component:
node system
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
22 Feb 2011 at 09:52 UTC
Updated:
8 Apr 2011 at 06:40 UTC
I am using drupal 7 cck and views. In views am using one argument Node: Nid.I need to get the node id and store that nid into a custom table.
please help me how to get the nid with views page argument.Its possible in d6 with the help of hook function hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL).
thanks in advance
Comments
Comment #1
senthilmohith commentedsorry friends..
hook_page_load instead of hook_node_load
sorry..
Comment #2
senthilmohith commentedin d6 get page arguments like,
function mymodule_nodeapi($op, $node, $f, $g) {
if($op == 'insert'){
if($node->type == 'file_upload'){
$prevoiusNode = arg(3);
if(is_numeric($prevoiusNode)){
db_query('INSERT INTO {sample_table} (current_nid, prev_nid) VALUES (%d, %d)', $node->nid, $prevoiusNode);
}
}
}
}
i need d7 coding like above.. please help me.
Comment #3
senthilmohith commented