THEME_preprocess_page_xxx? I need to make changes to several admin pages, instead of conditionally tests for the page/node (ie: User, Appearance, Views admin pages right now) can I override each using more specific theme functions?

MYTHEME_preprocess_page_admin_user
MYTHEME_preprocess_page_admin_views
MYTHEME_preprocess_page_admin_appearance


Is this possible? It's the themeing function not the template TPL I need to execute as I am re-structuring some list items in each -- not really changing the markup per se.

Alex
Out of the box, Drupal won't do this.  You can do something like this, though:

function MYTHEME_preprocess_page(&amp;$variables) {
  $parts = explode('/', request_path());  
  $subhook = __FUNCTION__;

  foreach ($parts as $part) {
    $subhook .= '__' . $part;

    if (function_exists($subhook)) {
      $subhook($variables);
    }
  }
}


This is untested (it may need some tweaking), but it will build up function names based on the request_path().  So, the idea is that if the URL is http://example.com/foo/bar/bar, it will check for


MYTHEHE_preprocess_page__foo()
MYTHEHE_preprocess_page__foo__bar()
MYTHEHE_preprocess_page__foo__bar__baz()


and call each, in sucession, passing in the $variables.

As this will call functions based on user input, you will want to think about some logic to prevent malicious activity, such as only doing it for certain paths, etc.

Just note, that if you are doing this to the admin pages, then you need to do this in the admin theme you have defined for your site, and not the main theme.

I don't normally do this with the preprocess page hooks, but I use something similar for the node ones based on content type and view mode.