0

I'm on page of my website and I'm viewing it with the theme developer module, which gives me a lot of information. It gives me some theme suggestions based on theme_hook_suggestions() which are:

html__profile_personal
html__profile_personal__%
html__profile_personal__113
html__profile_personal__edit

How can I create a new theme for this page? What naming convention should I use, given the info above?

1
  • 1
    There is no such thing as a theme_hook_suggestions(), they are simply theme suggestions :) Are you sure that you really want to override html.tpl.php (which just contains the basic html tags) and not page.tpl.php, which contains the actual page content?
    – Berdir
    Jun 4, 2011 at 13:15

1 Answer 1

1

Replace the underscore with a hyphen, and you get the name for the template file.

If the suggestions you are getting are the ones reported by theme_get_suggestions(), then they are the ones returned from template_preprocess_html() for a page at /profile_personal/113/edit.

The first suggestion would be applied for all the pages with a path starting with /profile_personal/; the last suggestion would be applied also for a page with path /profile_personal/edit, and the one before the last would be applied also for /profile_personal/113/revisions.

Whichever you choose, you should always check the path of the currently show page, via arg().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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