I want to create a separate html.tpl.php for user pages and user edit pages like html--user.tpl.php and html--user--edit.tpl.php.

For nodes I have added:

if (isset($node) && $node->nid) {
  $vars['theme_hook_suggestions'][] = 'html__' . $node->type;

in template.php.

Is there a way to do this for user pages as well?


1 Answer 1


You can use this template for the user page: user-profile.tpl.php

For the user edit page you can take a look at this page: Customize the User Edit page in Drupal 7 - an example.

UPDATE: To add CSS and JS to specific page you can do it like outlined below in a custom module.

 * Implements hook_page_build().
function MYMODULE_page_build(&$page) {

  if (request_uri() == 'path') {

    drupal_add_js( // arguments );
    drupal_add_css( // arguments );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.