Change templates based on path alias What is the easiest way to select a template based on path alias. For example, if I have the following URLs:

http://www.example.com/mydirectory/page1
http://www.example.com/mydirectory/page2
http://www.example.com/mydirectory/page3

How would I go about creating a template for all of the pages in mydirectory? I should also add that using content type to theme these pages is not an option.
You can add some logic in a hook_preprocess_page() implementation that checks the alias, and adds theme hook suggestions if the path matches, e.g.

function MYTHEME_preprocess_page(&amp;$vars) {
  $alias_parts = explode('/', drupal_get_path_alias());

  if (count($alias_parts) &amp;&amp; $alias_parts[0] == 'mydirectory') {
    $vars['theme_hook_suggestions'][] = 'page__mycustomtemplate';
  }
}


Then if you create a page--mycustomtemplate.tpl.php file in your theme, and clear the cache, any pages with an alias beginning mydirectory/ will use that new file instead of the standard page.tpl.php.