The Recent page lets users see exactly what the most recent additions to the site are. However, I have a whole crudload of node types, and users are having a hard time sorting between the stuff they want to look at.

Is there any way I can create a "recent" page for each node type? That way, my users could find just what they wanted.

Comments

Anonymous’s picture

The views module will get you pretty close. I'm using 4.7, but AFAIK this functionality is there in 4.6: You define a view, check "provide a page" and define what filters should apply - in your case the content type.
I dont know if there's a way to limit the number of results for a page .. in which case you might need to use the view in a block instead, and then configure that block to only show up on that page.
You could do the same with a php snippet in your page of course to build the query and iterate over the results.. see the page snippets section under handbooks for examples of this kind of thing.

Rory--’s picture

Thanks! I'll look into that!

venkat-rk’s picture

The last time I looked, Views did not support book pages and flexinodes, so you may want to check the current status about that.

Rory--’s picture

No, it supports flexinodes. and I don't need a view for book pages: that's built-in quite well.

Everything about the views work for me now, thanks. My new question: is it possible to auto-view? That is, create a view for each node type that follows a certain set of filters and display settings?

gabriella’s picture

You could use a php snippet like this one by Merlinofcaos.
You can set the listlenght and node type to fit your needs, and it gives you a pager.

<?php
/**
* the following displays a list of the 10 most recent weblog titles
* and links to the full weblogs. If you want to increase/reduce
* the number of titles displayed..simply change $listlength value
*
* This php snippet works with drupal 4.6.
*
*/
$listlength="10";
$nodetype="blog";
$output = node_title_list(pager_query(db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = '$nodetype' AND n.status = 1 ORDER BY n.created DESC"), $listlength));
$output .= theme('pager', NULL, $listlength);
print $output;
?>