List articles of a category in frontpage

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
lufutu's picture

I want display all articles of a category in frontpage as http://www.clarendoncitizen.com/
Is it possible ?

Comments

Yes, this is easily done

pkcho's picture

Yes, this is easily done using views, filtered by each category (taxonomy) and displayed as a list.

For example, if you take the default articles listing (view) from the OpenPublish install (the one that is displayed on the left column beneath the featured article) and edit the view by taking out the image field, the teaser field, the date field and then filtering it by taxonomy term (which ever category you want), the result will be similar to what you're looking for.

If you aren't familiar with views, it would be a good idea to learn as much as you can about it. Views allows you to do so many wonderful things. Views is daunting at first, but with some familiarity you will be able to do more and more complex things with it.

Hope this helps to get you started.

I love Drupal

lufutu's picture

Thanks bro, very useful :)
One another question, can i change output of view?
Ex: with first result i will display all fields but after i only want display one field .

lufufu.com

I did this on our site by

Dave R.'s picture

I did this on our site by stacking views blocks. The top one has the Title, Author, Date, and Teaser fields, the bottom one has just the Title and Date fields. I set the display on the bottom one to offset by two so that the first two items do not repeat.

http://easthamptonstar.com/

Thanks but other solution?

lufutu's picture

I understood,did your solution is add 2 block for one category, i can do that if i have two or three categories, but with many categories i thinks that not good solution, can you give me another solution?
Anyway, thank you very much

lufufu.com

Yes, you can do what you're

pkcho's picture

Yes, you can do what you're looking for by adding an attachment for the same view and then adding it to the top or bottom of the main view.

When you go to one of your views, you will see the list of different views on the left (block, page, etc...) and then a pull down menu and then an add display button and then analyze button. In the pull down menu, there should be an option for an attachment.

You will create a block view with the full details you want displayed. Make sure you choose "1" for items to display. Then you will create an attachment with the teaser views and you can change the items to display to "5". Make sure to offset it by "1" so it does not display the first record twice. Add it to the bottom of the block you created above and viola! you have your view.

Amazing

lufutu's picture

I don't know about attachment, i must learn more about drupal.
Thanks everybody

lufufu.com

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week