How we can display a subtheme in a s开发者_如何学Gopecific page in drupal, such as a taxonomy page?
Do you mean you want to use a subtheme of your main theme for certain pages?
Have a look at the Sections module, which lets you specify a theme for pages or groups of pages matching a pattern on their URL.
It doesn't matter whether the theme you want to apply is a theme or a subtheme.
Hope this helps,
James
Another option is to use themekey. Themekey lets you choose the theme based on a whole lot of different factors, one option is the path
Use this code in your hook_boot():
function mymodule_boot() {
if (/* test based on the $_GET['q'] or REQUEST_URI */) {
$GLOBALS['custom_theme'] = 'myothertheme';
}
}
this sounds like a job for context and spaces. These modules will allow you to set up different themes for different sections of the site based on a set of parameters. It's very flexible and provides a framework to deal with a variety of such theming issues, not just this particular one.
Alternatively you could set up alternative .tpl.php files that are chosen in a preprocess based on the path.
精彩评论