I have a content-type "foo" and some nodes with that type. Now, if you go to one of the node pages, e.g. /node/22, you see the node title as the page title.

I can edit the html of the whole page using node--foo.tpl.php but I can't edit the title/titles html.

How can I change the html of the title div on such a page for a specific content-type?

1 Answer 1


Depending on your current theme, the title may be found in the node.tpl.php, the page.tpl.php (usually this one) or html.tpl.php. Enable theme debugging to toggle theme debug comments. That way, you see which templates control which portions of the page.

Add the following to settings.php and refresh a couple of times (clear cache if it becomes stubborn). Then inspect the page.

$conf['theme_debug'] = true;

With theme debugging on, you'll also see the progression of template name suggestions in the comments, with the top most/most specific/longest name being selected first.

You can also add to this list by altering the theme_hook_suggestions property in the variables argument of the appropriate hook_preprocess_ hook. If I remember correctly, there's no suggestion content type suggestion for templates. If so, you'll have to add one.

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.