I've created a "homepage" content type, and I've created the node-homepage.tpl.php template file, but it doesn't seem it is used, even after I cleared the cache about 10 times.

I am also trying to display a view in this custom template file. How can I achieve this?


In Drupal 7 you should use two dashes : node--content-type.tpl.php.

Embeding view:

<?php print views_embed_view('articles','block', $node->nid); ?>

articles - name of view, block - type of view, $node->nid - argument.

|improve this answer|||||

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.