开发者

Subthemes in Drupal

开发者 https://www.devze.com 2023-02-07 21:20 出处:网络
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 subthemeof your main theme for certain pages?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消