Shawn
Shawn

Reputation: 34229

overriding drupal's theme_item_list

I have a list rendered by drupal(7)'s item-list theme hook, the output becomes something like:

<div class="item-list">
  <ul> 
    <li> ... </li> 
  </ul>
</div>

This isn't the structure I needed, is there a way I could override this particular hook so I can implement the rendering exactly I want it to?

To generalize, is there a way to override any theme hooks defined by drupal core?

Thanks.

Upvotes: 0

Views: 1085

Answers (1)

Webdrips
Webdrips

Reputation: 265

Place the override in your template.php file and rebuild your theme registry when finished:

function mytheme_item_list($variables) {
  // Copy code from 
  // http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_item_list/7
  // and make any desired changes
}

Upvotes: 1

Related Questions