1

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?

1 Answer 1

0

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.

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.