tags:

views:

428

answers:

1

I want to add some additional formatting to my menu. I've been looking at menu.inc and am unsure which method would i override to do something like the following.

if content type = "fund"

print " some additional formatting "

+1  A: 

That's not really something you would want to do in the hook_menu, actually.

I'm not sure what you're doing for sure, but it sounds like what you want to do is to use the hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) hook, something like this:

function example_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  if ($op == 'view' && $node->type == 'fund') {
    $node->content['my_fund_data'] = array(
      '#value' => 'Some additional formatting',
      '#weight' => 10,
    );
  }
}

Now, if what you want to do is change the content instead of just add something below it, you'll want to investigate what the rendered node looks like - I suggest installing the devel module, which will give you a link to view the rendered node data easily.

John Fiala