views:

17

answers:

1

I'd like to add a css class to the body_classes_array as if I were using template_preprocess_page to alter &$vars, but I'd like to do it through hook_menu() page callback.

Is it even possible to do?

+1  A: 

No it's impossible to use hook_menu for that. All you can use it for is to create menu items.

The hook system that drupal uses is designed to let you do very specific things with each hook.

googletorp
Thank you for responding, googletorp.Can you say what page arguments are allowed to be passed to a page callback? I've seen examples that use arguments other than arg(), but I haven't seen a list of what's allowed.
You can use ints which gets parsed by arg, or text strings. You can use a load function to load an object like Drupal does with `%node`. Check the documentation at http://api.drupal.org/api/function/hook_menu/6
googletorp