Agaric Design Collective

How to reset the theme registry

Average: 5 (4 votes)
By Benjamin Melançon
on 18 Oct
0 comments

Key words and phrases

php function to reset drupal theme registry empty theme cache and rebuild it drupal_rebuild_theme_registry edit and refresh themes caching data

Tags

Description

The Drupal function to reset the theme registry is drupal_rebuild_theme_registry (D6).

You can add it to your template.php while developing:

<?php
drupal_rebuild_theme_registry
();
?>

Adding it to template.php works, of course, even if where you're altering the theme registry (and need to see it reset) is from work you're doing on a module.

Remember to take it out again!

Installing devel module and using its reset cache function is probably easier and definitely better practice.

 

Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <small> <pre> <strike> <sub> <sup> <kbd> <s>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.