Understanding node-list pages in Drupal
Posted December 9th, 2007 by DrupalaceFirst a question: Is there some Drupal name for "pages that list nodes"? Like the front page on many sites (including this one) – any web page that lists nodes, as opposed to a web page that is a specific node. For lack of a name, I'll call these "node-list pages".
Whatever the name, I responded to a couple of Drupal.org forum posts on the same issue around which I initially had to wrap my newbie head before Drupal "opened up" to me. It's this: How do you place nodes onto a given page? It's pretty clear how to do so for the front page, but how do you create, say, this site's "Question Bank" page, which is a page listing all of my "question" nodes?
The short answer is easy: You don't create the page. You give Drupal the instructions for creating it.
In more detail:
Other than the built-in mechanism for populating a front page in Drupal with nodes, you don't "promote" a node to a given page (or "place" a node on a given page, etc.). Rather, your desired page listing nodes (like my Question Bank) is created by Drupal on the fly, out of nodes that match some specified criteria. It might be all nodes containing a taxonomy term like "question". Or it might be all nodes of a given content type. (My Question Bank? All the nodes are a custom CCK type I made. The Question Bank page is a list of all nodes of that type, called up using Views.)
I don't know whether the following is a canonical way to explain what Drupal does, but the way I think of it is this: A node-list page doesn't exist as a "container" for the nodes you'll later place in it. A node-list page doesn't even exist as a standalone page at all!
All that exists is a link, which you've probably placed in a menu. That link is an instruction to Drupal to call up all nodes of some given criteria (such as nodes with a taxonomy certain term), or call up a View that lists all nodes of some given criteria, and create a node-list page on the fly.
Which is to say: The key to understanding Drupal node-list pages is that it's all about creating the links, i.e., the instructions for calling up nodes (as well as preparing the taxonomies, Views, etc. that the instructions will work with). And not about creating the pages themselves.
Think link. At least, that's the mindset that worked for me when I first stumbled over the issue of "but... how do I make the page?" It may be a helpful reminder for other newbies, or those coming over from CMSes that, unlike Drupal, do have you "place" a node onto a pre-existing "container" page.
Update
Here's a good related resource: Content, the Drupal Way. Highly recommended for anyone new to Drupal.
Also, on this site, see Placing Content on Pages.












