5

What is the actual difference between a node and a page in Drupal 7? Why there is separate page.tpl.php and node.tpl.php pages. How is the theming applied for the actual page.

Any link for understanding all this would be greatly appreciated.

  • You should start with the Theming Guide. – Triskelion Mar 9 '13 at 6:45
  • 1
    A node is basically a display type for an entry of a "Content Type". For example, if you create a content type called "Restaurants" which has fields "Name", "Address", "Phone Number".... then when you go an create a new piece of content of type "Restaurant", the URL will be something like www.yousite.com/node/* . The display of the fields for the new content you created at www.yousite.com/node/* is determined by node.tpl.php. On the other hand, page.tpl.php includes EVERYTHING you see in the page. So page.tpl.php is for EVERYTHING you see, and node.tpl.php is for node content only. – drupalmav Mar 9 '13 at 6:51
20

node.tpl.php

Default theme implementation to display a node.

page.tpl.php

Default theme implementation to display a single Drupal page.

see image for more detail.

enter image description here

1

Page.tpl.php contains, header, footer, left block and content section, while node.tpl.php contains content section

0

Pages may hold nodes, blocks, modules.

In the other hand nodes holds only articles, news, pictures, bla, bla.

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.