I have a taxonomy of Recipe tags like Salads, Soups, Breads, etc. I want to display a block on one of the sidebars of recent Salad recipes, and another block of recent Soup recipes, etc.

I would like to have an option whether to display in those blocks just the Title or Title & Excerpt. I would also like to control how many items are included in the block.

I'm still struggling to learn Drupal and its concepts and methods. From looking around the Forum and Googling I see that I could install the Views module. But this seems like a fairly obvious and desirable thing to do and my guess is I can do it without installing any modules. Can I?

Advice is welcome, including links to the place where my answers probably already exists. Step-by-step instructions would be the nicest thing of all.

Thanks.

Comments

gforce301’s picture

The views module is what you want. You are correct that this is "a fairly obvious and desirable thing to do". In fact it is exactly one of the things that 90% of people would use views to create. It is one of the things views was created to do.

ArthurC’s picture

Thank-you. I've got the Views module working. Now I'd like to change the way the blocks display. I'd like to change the background and outline of the blocks. What file should I modify? It's a CSS file, right? Or should I add something to style.css?

gforce301’s picture

AFAIK views does not really have any css to style blocks it creates. So I would just add to your style.css for your theme to style the blocks how you want.

ArthurC’s picture

I set values in style.css for the class selector ".view-content" and it worked well.

gforce301’s picture

You're welcome. Glad I could help.

If you look at the source that views outputs you will see there are a number of block containers (div's) that wrap the content. Some of them have general viewes classes like ".view-content" which you styled and some will have classes specific to your view. If you intend to use other views on your site, you might not want to style the general class ".view-content" as it most likely will effect your other views also.