Skip to main content

Drupal 7 notes: node--[type].tpl.php being ignored

Posted on: Friday, 24 June 2011 @ 9:20pm
Blatting about
More specifically

If you change the machine name of a content type, make sure you bump all the nodes that were created under the old machine name.  If that doesn't work or there are too many of them, change them in the database.

In the below example I was trying to theme the "estimate" nodes with node--estimate.tpl.php.  It wasn't working because node 1 in this case still had the original type of "screen".

Node type as viewed by phpmyadmin

Changing the type in the database had the desired result of the template file now works but appears to be producing the word "Array" on some pages, though I haven't yet worked out whether that was due to me force changing the type or something unrelated.  First time I'm working in a big team and all so it may not be my fault for a change and I'm just assuming it is :)

No comments yet

jinsonkv Thursday, 26 February 2015 @ 8:36pm [Permalink]
this isgood as i think

Add new comment

The content of this field is kept private and will not be shown publicly.