Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Rory-- on
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
Views
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.
Thanks! I'll look into that!
Thanks! I'll look into that!
The last time I looked,
The last time I looked, Views did not support book pages and flexinodes, so you may want to check the current status about that.
No, it supports flexinodes.
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?
You could use a php snippet
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.