By NitroPye on
I am creating a module and having some difficulty getting what to me seems to me general information.
For instance, I need to get information about the current node. I know you can use global $user, but I don't need user information, I need the node id for the current page so I can get taxonomy information for that particular node and do some of my own queries.
Comments
Hopefully helpful
Method one:
Or, assuming you are starting from a MENU_CALLBACK or other menuing item that calls back then you'll have, for example 'path' => 'myfunc', 'callback' => '_myfunc', in the menu items array. Then, in _myfunc() do this.....
So, in the above example, with the path :
myfunc/23 then $args[0] will be 23
myfunc/23/edit then $args[0] is 23, $args[1] is 'edit'
Thanks!
That's perfect. Did the trick. Putting that in my notes.