I’m learning how to use Drupal right now. I installed the Views module in order to set up an archive, but it produces a monthly archive that includes anything that has been created or changed during each month.
I’d like to achieve two small changes: include only articles and lose the monthly sub-grouping (because it would be overkill while there isn’t a huge number of articles and might never be appropriate).
I haven’t been able to work that out in the Views settings. Can Views do this, or is there another (perhaps lighter) module that is better suited? All suggestions welcome.
Don’t give up on views. Views will become your best friend after a while. Views is powerful… I’ve been using Views for about 4 years and I’m not sure I’m even tapping half of its potential.
Before I can try to help, I need to know what Drupal and views versions you’re dealing with. Let me know what you’re working with and I’ll try and help you out. Just the basics, Drupal 5, 6 or 7. Views 5.x, 6.x, 7.x
Ok, so I did a little bit of fiddling around with a copy of a D6 site I have with 3 years of Blog postings. The production site has a view (block + page) that lists out links to the archived posts per year/month. If you click on a link in the block it directs you to the view’s “page” which lists out only those posts for that year/month. Here’s a link so you can see: http://www.thevantagepoint.ca/blog
On the dev site I cloned the view and then changed a few things:
I changed the path for the page so it had its own page… otherwise it had the same path as the page from the view I cloned and it won’t work.
I changed the Arguments:
[LIST]
The original argument was "Node: Created year + month"
The title was “%1”
Action to take if argument is not present: “Summary, sorted descending”
Wildcard: “All”
Wildcard title: “All”
[/LIST]
My new argument for the cloned view is Node: "Created year" with all the same attributes of the above left intact and the style is a “list”.
The interface for Views in Drupal 7 are quite a bit different but I’m sure you can get all of the same settings in the advanced area.
Don’t forget to set your filter to the appropriate content type, published, etc…
Thanks very much indeed, Andrew. I’ll give that a go and let you know how it goes.
EDIT: Phew! Progress made! It took some wild guesswork and trial-and-error, but your info was a helpful hint in the right direction and it’s now set up just about right. Now to make notes so that I can repeat it on the live site when the time comes.
There are two things you can do to help you when it comes time to migrate the changes to the production site.
The Backup and Migrate module… You can back up the content and settings of your development site into a mysql file (of sorts) and then restore the file to your production site. This is assuming that the content is identical on the development site as this will replace all content, settings, users etc…
Views export… Export the view from the development site and import it into the production site.