One of the biggest problem of the drupal experience out of the box is the lack of a way to list nodes per content type. Without 'views' there are two ways to list content, promote it to frontpage (but this is an old fashion blog-like approach) or assign a category to it (that requires to assign the category to each node - sometimes just replicating the categorization you just made by creating different content types) . In my experience most of the time when I create a content type I want a page that lists all the node of that types. Since views hasn't been included in core this time I believe we should provide a simple solution to do that.
The attached patch does just that. For every content type created there's a corresponding listing of nodes at node/view/%content_type .

My original idea was to provide a checkbox on the content type creation form to let the user decide whether create this page or not with a field to create a menu entry for this page. A select box with a couple of choices for sorting (alphabetically or creation date) would be an incredible addition. With something like this in core many users could probably avoid to install 'views' at all (the greatest of the modules but a really complex one, too).
So this is just a stub. My coding skills are limited (I stole here and there), but I'm sure that someone can have look and make it better.

CommentFileSizeAuthor
#5 node.patch4.18 KBdodorama
#1 types_listing.patch2.35 KBdodorama

Comments

dodorama’s picture

StatusFileSize
new2.35 KB
dodorama’s picture

Status: Needs work » Needs review
Anonymous’s picture

Status: Needs review » Needs work

Honestly, if Drupal core included this by default, I would be able to run a few sites without views at all. :)

The patch appears to be only one or two lines different than node_page_default. Other than that it is a direct copy paste. Rather than duplicate that much code, it might be preferable to modify node_page_default to show nodes of a certain type if it receives an argument or to continue showing all nodes if no argument is passed.

This is definitely worthwhile though. This is easily one of the important missing features in earlier versions of Drupal.

dodorama’s picture

That makes sense. I'll try to rewrite node_page_default to receives argument. But if someone with more code skills want to jump in I'll be more than happy.

dodorama’s picture

Status: Needs work » Needs review
StatusFileSize
new4.18 KB

Here's an updated patch. I rewrote node_page_deafault to receive arguments.
@TODO
1. The title of the page listing nodes of a specified type is actually the name of the content type. Is it possible to pluralize it (Article -> Articles)?
2. We should write somewhere in the help that this is available and that the user can add a menu link to these pages
3. we need to find a proper path for these pages, actually it is node/types/$node_type
4. It would be great to control in some way the sort order (alphabetical or created)

I believe this is a small change that can avoid the installation of views in many cases.

agentrickard’s picture

Version: 7.x-dev » 8.x-dev

We are too late in the cycle for new features, unfortunately. Bumping to Drupal 8.

dodorama’s picture

Version: 8.x-dev » 7.x-dev

I don't understand why this can't go in. I won't call a few line of codes that extend a pre-existing function a new feature. It just makes drupal more usable out of the box for a certain kind of users. In my opinion this is just a UX improvement. I put this back to drupal 7 for the moment. But feel free to bump it back to drupal 8 it if you think I'm wrong.

Thanks for taking the time to review it, anyway. This is probably the most "complex" patch I ever submitted (yeah. that was hard for me!), so let's see if it can have a second chance.

agentrickard’s picture

It's a fine patch, but it is a new feature, and we are in feature freeze and trying to close the queue for 7.x alpha 1.

Deferring status to the UX team.

Anonymous’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Active

From IRC.

[10:56] <joshuarogers> webchick: (I've got to quit bugging you.) Could I get your opinion real quick?
[10:56] <joshuarogers> #675170
[10:56] <Druplicon> http://drupal.org/node/675170 => provide a page listing nodes of a certain type => Drupal, node.module, normal, needs review, 8 comments, 1 IRC mention
[10:57] <webchick> joshuarogers, sounds like a feature to me. d8

Would have loved it to be in, but she's right. The feature deadline is definitely gone.

Edit: Didn't think about the brackets getting stripped. Added their HTML replacements.

agentrickard’s picture

Category: task » feature
dodorama’s picture

Again, thank you for reviewing this. Looking forward for a proper view integration in Drupal 8.

yoroy’s picture

Priority: Normal » Major

Major as in this is a should-have, not nice-to-have.

dodorama’s picture

Status: Active » Closed (duplicate)

There's a much better and expanded patch here.
#1210366: Per-bundle node listing pages, blocks, feeds.
Marking as duplicated.