简体   繁体   中英

How to create dynamic drupal 7 taxonomy views

I have to create 1 view using taxonomy.

Let's take the example i have 8 categories: cricket, football, tennis, swimming.

I have to show this each category with their 5 latest articles.

Thew views should display database like

Cricket

  1. Article
  2. Article 2

Football

  1. Article
  2. Article 2

Like this all 8 categories with grid layout and 4 categories in row.

right now what i am doing is creating 8 different views and showing on 1 page.

But this create issue when i am adding new category.

So it's dynamic view can help or i have to write code for this.

You should create a single view to display articles and then require that they have a relationship to your taxonomy vocabulary.

You can the group the articles by their taxonomy terms to list them in the way you are looking to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM