I'm creating custom templates for my Drupal 7 site. There is a custom content type called flowers.

  1. Which template file (.tpl.php) should I put under templates directory of my theme's folder for displaying a single flower-type node?

  2. Can I use the Views module to create different views (i.e displaying picture of a flower in a view & displaying species of the flower in another view) for displaying only a single flower-type node? So far I can create pages that displays list of flower-type nodes. I want to display just a single (perhaps providing it's node-id) flower-type node. How do I do that?

    2.1. For displaying different types of views to display a single flower-type node, which template files (.tpl.php) should I edit?

Thanks in advance for caring :)


Create node--flowers.tpl.php, put the default code from modules/node/node.tpl.php, and edit it.

  • Thanks @ram4nd. Would you please take some time and answer the 2nd problem - creating Views using Views module to display just one flower? Thanks – Shafiul Oct 15 '11 at 10:13
  • You can do this under pager settings. Instead of pager select display specific number of items. And you can configure the number of displayed items and offset. – ram4nd Oct 16 '11 at 9:38
  • Your answer is incomplete, so I answered it after creating a fully detailed tutorial on my blog. Thanks & +1 for helping – Shafiul Nov 4 '11 at 4:35

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.