I would like to change the layout of my content type. I tried the syntax: page--content-type.tpl.php of Drupal 7. but...I was not able to make the changes appear on the page. When I write the file: page--node--numberNode.tpl.php work, but when I write the file: page--content-type.tpl.php nothing happens.

1 Answer 1


According to Drupal 7 Template (Theme Hook) Suggestions there is no page--content-type.tpl.php, only node--type.tpl.php If you have to use a page-content-type.tpl.php you must create a template suggestion. This (d6) or this (d7) might help you doing so.

  • I received the error is: "Fatal error: Call to undefined function node_get_types()". This feature has not been defined. Help me to run this hook please? (you see: Page template per content type)
    – Antilope
    Commented Nov 4, 2012 at 18:13
  • Hm, it looks like the link above is for d6. Try the d7 equivalent: node_type_get_names() instead of node_get_types()
    – Mike
    Commented Nov 4, 2012 at 18:32
  • thank you! surely this is the error. But I can not fix it. I tried with: $types = node_type_get_types ('names'); / $types = node_type_get_types();
    – Antilope
    Commented Nov 4, 2012 at 18:45
  • I made a mistake on the link, it works very well. thank you!
    – Antilope
    Commented Nov 4, 2012 at 19:17

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.