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
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)– AntilopeCommented 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()– MikeCommented 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();– AntilopeCommented Nov 4, 2012 at 18:45
-
I made a mistake on the link, it works very well. thank you!– AntilopeCommented Nov 4, 2012 at 19:17