Skip to main content
2 of 2
added 98 characters in body
Jimajamma
  • 17.1k
  • 1
  • 28
  • 35

If the pages www.yoursite.com/special, www.yoursite.com/special/anotherpage, etc are the actual paths to the content and not aliases, then page--special.tpl.php should work for all of them. If, however, they are aliases to node content, eg, www.yoursite.com/special/anotherpage is really something like www.yoursite.com/node/123, then you could do something like this in your theme's template.php file...

function YOURTHEME_preprocess_page(&$vars) {

  $alias=drupal_get_path_alias($_GET['q']);
  $args=explode('/', $alias);
  if ($args[0]=='special') {
    $vars['theme_hook_suggestions'][] = 'page__special';
  }

  // any other page preprocessing here

}

...which takes a dull ax to the url and chops it apart and if the first part is special then it tells drupal to use your page template for it. If, however, you know that all of the nodes there are of a certain type, you could do it this way instead...

function YOURTHEME_preprocess_page(&$vars) {

  if (!empty($vars['node']->type) && $vars['node']->type == 'SPECIAL_TYPE') {
    $vars['theme_hook_suggestions'][] = 'page__special';
  }

  // any other page preprocessing here

}

...which would tell drupal to use your template file whenever it displays a SPECIAL_TYPE node on a full page.

Jimajamma
  • 17.1k
  • 1
  • 28
  • 35