Finding the path to the current theme
It turns out, path_to_theme() only works correctly when used within a theme's template.php file. When used within a module it returns, system/module.
The following will always return the path to the theme.
$type = 'theme';
$name = variable_get('theme_default', NULL);
$path = drupal_get_path($type, $name);For more info: http://api.drupal.org/api/function/drupal_get_path/6




Comments
Post new comment