I've everything and two themes to get node.tpl.php and node--content_type.tpl.php and nothing is working. I tried adding a preprocess hook in template.php but nothing is working. I've tried scouring D.o. and here and see similar problems but none of the answers solve my issue.

I've tried skeletontheme and zircon and neither one is giving me anything back. In skeleton, they have themes/skeletontheme/templates/node.tpl.php but altering this file in any way does absolutely nothing. I think they may have included it without needing it and never worried about it. But it does nothing out of the box. I added a preprocess hook in their template.php file and it still does nothing. So I think I'm just using the wrong preprocess.

Zircon has themes/zircon/tpl/page.tpl.php but no node.tpl. So I added one and the content_type.tpl and nothing. So I added a preprocess hook there but still nothing.

page.tpl.php works on both just fine.

1) I've made sure the preprocess has the correct them name like zircon_preprocess

2) I've made sure my machine name on the content type is correct and it is

3) The skeletontheme node.tpl.php looks like it works on none CCK created content types. I.e. blogs, articles, and the front page. But on any CCK created content-types it doesn't work. I've scoured the template.php and the node.tpl to look for IF statements that might be excluding anything. No luck.

4) I've never actually gotten node.tpl.php or node--content_type.tpl.php working since I was mostly using distribution packages before and they were already included and I just customized them. I've even gone back and look through their templates.php and I can't find anything.

So can I have a step-by-step (other than the one on D.o that I can't get working) for getting node.tpl.php and node--content_type.tpl.php working from the beginning as if you were creating a theme from scratch?

  • So, what are you trying to accomplish more specifically? You're trying to create a custom template file for a specific content type or are you just trying to modify the node.tpl.php for all content types? If it's the first, are you just trying to include custom fields in there or are you modifying for a different reason? Would just be helpful to know what you're trying to accomplish more specifically... – Boriana Ditcheva Jun 6 '13 at 20:07
  • Specifically, the end goal is to create custom templates based on node types. So trying to get to node--content_type.tpl.php. However, I was including more detail about how I can't even manage node.tpl.php... – o_O Jun 6 '13 at 20:59
  • The format node--content_type.tpl.php (e.g. node--article.tpl.php) should work fine, and you don't need any preprocessing functions to be implemented for it to be picked up. And are you clearing your Drupal cache after making your changes? Also, could you include a link to the tutorial you were following (which didn't work for you). And finally, are you on Drupal 7? – Boriana Ditcheva Jun 6 '13 at 21:03
  • Yes, yes, and yes. I used drupal.org/node/173880, drupal.org/node/1095260, and quite a few more but I'd have to go into my history to find them. – o_O Jun 6 '13 at 21:12

Your Answer

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

Browse other questions tagged or ask your own question.