Ask Agaric: Views of comments in Drupal 5
how do I make a view that displays only recent comments made on a certain content type?
This is basic views functionality.
Simply filter by node: type to restrict the view to specific content types.
The trick is you have to choose list (or table and possibly other views made possible by the Views Bonus Pack). Then you can select which fields to show: comment subject and time and body and anything else comment related.
If you choose full node or teasers for your view, fields are ignored entirely. And you can't show comments without fields.
Agaric's extra tip:
To edit a default view (a view provided by views module or another module), you click "Add" (rather than enable).
This also lets you see how that view was created, which can be helpful in making or refining your own.
If you change the name and path, at least, you get a copy of the view with any other modifications you made.
So the easiest way to show recent comments by node type would be to go to Administer » Build » Views (admin/build/views) and click add next to recent_comments, add a filter to restrict matches to the relevant content type or types, and save as your own view.
Agaric additional extra tip, on panels:
Views combined with Panels can be used to create a page with two lists, one in each column. (Both these great, essential modules are by merlinofchaos, aka Earl Miles.)
In Drupal terminology we want a two-column panel with a view in each. So you make your views, probably by making one and then easily making a variation of it by clicking "clone" (make sure the clone view module is enabled if it isn't in Views core yet).
Don't forget to change the view name (machine-readable and optional title) and url path (if any) for the new copy of the original view.
how do I make a view that displays only recent comments made on a certain content type?
This is basic views functionality.
Simply filter by node: type to restrict the view to specific content types.
The trick is you have to choose list (or table and possibly other views made possible by the Views Bonus Pack). Then you can select which fields to show: comment subject and time and body and anything else comment related.
If you choose full node or teasers for your view, fields are ignored entirely. And you can't show comments without fields.
Agaric's extra tip:
To edit a default view (a view provided by views module or another module), you click "Add" (rather than enable).
This also lets you see how that view was created, which can be helpful in making or refining your own.
If you change the name and path, at least, you get a copy of the view with any other modifications you made.
So the easiest way to show recent comments by node type would be to go to Administer » Build » Views (admin/build/views) and click add next to recent_comments, add a filter to restrict matches to the relevant content type or types, and save as your own view.
Agaric additional extra tip, on panels:
Views combined with Panels can be used to create a page with two lists, one in each column. (Both these great, essential modules are by merlinofchaos, aka Earl Miles.)
In Drupal terminology we want a two-column panel with a view in each. So you make your views, probably by making one and then easily making a variation of it by clicking "clone" (make sure the clone view module is enabled if it isn't in Views core yet).
Don't forget to change the view name (machine-readable and optional title) and url path (if any) for the new copy of the original view.
Comments
Post new comment