Force a page to be rendered in admin theme (overlay mode) Is there a way to force a page to be rendered in admin theme, Like pages that their path begins with 'admin/'?
You can also do this by making a custom module.

Method 1

Use this if you want to theme an existing page, based on Drupal's internal path (aka path source). This example uses hook_custom_theme.

&lt;?php
function MYMODULE_custom_theme() {
  // match node/1
  if (arg(0) == 'node' &amp;&amp; arg(1) == '1') {
    return variable_get('admin_theme');
  }
}


Method 2

Use this if you want to theme an existing page, based on URL path (aka path alias). This example also uses hook_custom_theme.

&lt;?php
function MYMODULE_custom_theme() {
  // get arguments
  $arg = explode('/', substr(request_uri(), strlen(base_path())));
  // match {wildcard}/path 
  // Using strpos as $arg[1] may end up having stuff like so ?order=title&amp;sort=asc
  if (isset($arg[1]) &amp;&amp; strpos($arg[1], 'path') !== false &amp;&amp; !isset($arg[2])) {
    return variable_get('admin_theme');
  }
}


Method 3

Use this if you want to theme and create a page. This example uses hook_menu. To learn more, take a look at another great article on hook_menu.

&lt;?php
function MYMODULE_menu() {
  $items = array();

  // match some/path
  $output['some/path'] = array(
    'title' =&gt; t('Page Title'),
    'page callback' =&gt; 'MYMODULE_page',
    'theme callback' =&gt; 'variable_get',
    'theme arguments' =&gt; array('admin_theme'),
  )
}

function MYMODULE_page() {
  return 'Hello world.';
}