Created
August 19, 2011 19:46
-
-
Save markdorison/1157808 to your computer and use it in GitHub Desktop.
Get current nid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _get_argument_nid() { | |
foreach (range(1, 3) as $i) { | |
$node = menu_get_object('node', $i); | |
if (!empty($node)) { | |
return $node->nid; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment