Need to create a custom Rules Action. How do I pragmatically get the node ID for an action such as when a node is saved?
1 Answer
You can pass parameter node then you will get full node object into your action.
function MODULEname_rules_action_info() { return array( 'CALLBACK_FUNCTION_NAME' => array( 'label' => t('Send Mail to users for new content'), 'parameter' => array( 'node' => array('type' => 'node', 'label' => t('Current Node')), ), 'group' => t('MODULE'), ), ); }
-
Is this accurate? I've tried it and I don't automatically get the node id. Apr 20, 2018 at 18:00
-
-
-