Hao
Hao

Reputation: 6589

Add html to menu title in Drupal

I must have missed something. I can't figure out how to add some HTML into the title of the menu.

According to the menu api, I can't add options because I am using MENU_LOCAL_TASK, but then how? There is no say.

For example: if I try to make the title bold:

$items['whatever/tab2'] = array(
  'title' => '<b>Tab 2</b>',
  'type' => MENU_LOCAL_TASK,
);

This is not working.

Upvotes: 1

Views: 220

Answers (2)

Leslie
Leslie

Reputation: 1

You could use the Menu HTML module.

Upvotes: 0

Sunnny
Sunnny

Reputation: 99

You can use 'title callback' => 'example_title_callback',

Function to generate the title; defaults to t(). If you require only the raw string to be output, set this to FALSE.

Upvotes: 1

Related Questions