1

Drupal lets you sub-theme a theme, basically like inheritance. How can I print out a list of all themes that a drupal site is 'using'. For example: actual theme -> parent theme 1 -> base theme

3

This is how Display Suite does it:

// Get layouts defined in the default theme and base theme (if applicable).
$theme = variable_get('theme_default');
$themes = list_themes();

$base_theme = array();
$ancestor = $theme;
while ($ancestor && isset($themes[$ancestor]->base_theme)) {
  $ancestor = $themes[$ancestor]->base_theme;
  $base_theme[] = $themes[$ancestor];
}
0

Install Devel and devel_themer modules. Go to the page you want to see where the output is coming from. Check the box at lower left corner which devel_themer creates. Click on the element, it will display which template was used and what are other alternatives. It aslo tell you which theme_function was used you can copy that function in you theme's template.php file name it as yourtheme_function and customize it. (Remember to enable the devel_themer module only when you are looking for templates or theme functions. It adds lots and lots of spans to html of the site)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.