-1

I have a content type which has category field.

I added few nodes. Each node has a value from category.

I would like to display a views block which should display titles grouped by category. That means:

Category 1

title

title

title

Category 2

title

title

title

I created a views block:

Format: Unformatted list

Fields: Title

Now, I have list of titles. I am not sure how I can add category(non linked) before the relevant titles?

  • I suppose similar questions have been asked before here (so a comment instead of an answer). Add your category as a field, and suppress it from showing. Then in the format settings (left top) choose a grouping field. That will give what you need. – Neograph734 Jul 16 '17 at 17:57
  • Please refer drupal.stackexchange.com/questions/237954/… – developer Jul 17 '17 at 5:37
1

You can group content based on the field. Click the format settings in View,

enter image description here

select the field here and group the content

NOTE: Grouping field should be added in the field area and then field will be shown in the grouping select list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.