I've been trying to figure out if there is a simple way to do this, it looks like the Taxonomy module is meant for this, but having a very hard time accomplishing this.

Basically, just want to create a Newsroom page that automatically lists the most recent items posted under that category. For example, if the user goes to "create content > page", can they then select "Newsroom" as a category, and then have a page at /newsroom/ update automatically with the date and title, and also update a block in the right sidebar with the same information?

Any assistance on this would be greatly appreciated.

Comments

nofue’s picture

Servus.

I guess you should check the Views module -- it's basically a "list generator" for Drupal and you can set it to filter all articles having that taxonomy term applied and sort the result by date. There's also a number of nodes you want to include, and you can send the output to either a page or a block. The block can be sent to some screen region, and you're done.

Norbert

-- form follows function

Norbert

-- form follows function

dbreit’s picture

You'll want to check these out as well:

PHP page snippets
http://drupal.org/node/23220

Display a list of (x) node titles of a specific type
http://drupal.org/node/24690

Or, create a new page with input format "PHP code" and paste in the following:

<?php
$items = array();
$listlength="15";
$charlength="150";
$taxo_id = 1;
$content_type = 'story';
unset ($output);
$result1 = pager_query("SELECT n.title, n.nid, nr.teaser, n.uid, n.created, n.changed, u.name, nr.timestamp FROM {node} n join {node_revisions} nr on (n.nid = nr.nid and n.vid = nr.vid) INNER JOIN {users} u ON n.uid = u.uid INNER JOIN term_node ON n.nid = term_node.nid WHERE n.type = '$content_type' AND n.status = 1 ORDER BY n.created DESC", $listlength);

while ($node = db_fetch_object($result1)) {
array_push ($items,  l(format_date($node->created, $type = 'custom', $format = 'm/d - ', $timezone = NULL) .$node->title, "node/$node->nid"));
}
$output .= theme_item_list($items);
print $output;
?>