Let's say I have a blog with several authors/users who publish articles and, when the user clicks on the author, I want to display all articles from that author (without using views nor taxonomy. Or do I need to use taxonomy?).

Could anyone guide me through this?

Thanks :)

Comments

VM’s picture

you need to pull data from the database and list it. I'm not sure how expect to do that beyond writing your own module.

sprite’s picture

You need to learn views and taxonomy.

The Views and Taxonomy modules are the fundamental Drupal components that are designed to do precisely what you want to do. They are not difficult to learn, and the more you know about them, the more efficient you'll be at Drupaling.

Most sophisticate Drupal builders don't use the built in blog feature. Most advanced Drupalers create a custom content type that is like the blog content type, but with a different name. You can even use the "field tools" module to clone the blog content type into a different custom content type to get started. Then one or more taxonomies can be created if you like, for use in building a Views query to select nodes from the custom content type for display in the View. It would even be possible to "expose" the author name field in the view, as an "exposed filter", so that site visitors could dynamically select a given author's content they want to see, all from a single site page.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

allan00958’s picture

Thanks, I'll try that.

Why do most drupalers create another 'article' type?

VM’s picture

depends on the project at hand. A content type is the container for the data being collected be it audio files, images, text, etc. I certainly wouldn't want ALL content generated in a single content type. New content types allow for another layer of differentiation.

blog.module has been deprecated with D8 no longer any need to use it with views built into core.

allan00958’s picture

I've tried it and it works. I have a LOT to learn about views. But it's not what I wanted to do.

I might have to create a module or maybe use taxonomy. The goal is to list all the articles when a user clicks on the author's name, which is very popular with wordpress themes. Sorry, new to Drupal....

VM’s picture

you have to set up proper contextual filters and relationships in views to group data. I assure you that it can be done as a default view is the user tracker which only provides a list for each user that posts/comments.

In fact this isn't a feature provided by any theme in Drupal. Please edit this post and move it to the post installation forum. Thank you. There is a defined line between content and presentation of content in Drupal. Generating lists is content not themeing. If you want to style a list then that would be themeing.

sprite’s picture

Read the following article, and the rest of this comment below ...
https://www.drupal.org/node/1578626

The profile2 module may help you along your way toward implementing your own module to do exactly what you want. You will also discover that the built in "tracker" module presents a list of the user's content on each user's user page as well.

What it seems like you want is an author profile page that includes a list of all the content (nodes) created by the author (drupal user).

Once again though, you can use a View to create the actual page with "teasers" for all content created by the "author"(i.e. drupal user).

Consider that Drupal.org's user Dashboard feature implements kind of what you want, plus many more features.

What you want to do is very Drupal. It is just that existing ready made modules do something similar, but may not do quite exactly want you want. You could probably write a module, based on the work of others, that automatically changes all user name links so that they go to a user profile page that lists all the author's content. There are modules that automatically hack words and links to do something (check out the word link module).

If you search really hard in the existing module listings here on drupal.org, you may find an existing module that does exactly what you want. After more than ten years of building Drupal websites, and being on this site, I continue to discover existing modules, on a frequent basis, that I didn't know about.

https://www.drupal.org/project/profile2 - (very popular)
https://www.drupal.org/project/dashboard - (Drupal 8 only)
https://www.drupal.org/project/profile
https://www.drupal.org/project/featured_content

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...