1

So I'm struggling again with my sorted links: there are many many links (node type) which also contain the field "link_category".

I collect them all in a view and sort them by "link_category".

It works like a charm and looks like this:

link 1 | Category 1
link 2 | Category 1
link 3 | Category 1
link 1 | Category 2
link 2 | Category 2
link 3 | Category 2
link 4 | Category 2
link 1 | Category 3
link 2 | Category 3
link 3 | Category 3

but now I want to hide the link_category on each item and instead, show one title above them like:

*Category 1:

link 1
link 2
link 3

*Category 2:

link 1
link 2
link 3
link 4

*Category 3:

link 1
link 2
link 3

Is it somehow possible with Views or do I need some extra modules?

2

You can use the group by field option.

The process would go as follows.

In Fromt section next to the Format you have settings click on that.

enter image description here

You will find Grouping field Nr.1 Select the category Field from the list.

enter image description here

This would group the fields with the Category. But Now you would see both category as well as Link. Now you can go to the Category field settings and select exclude from Display so that only the links would be shown.

enter image description here

| improve this answer | |
  • Excellent! One more question: how can I format the category title? I can't find any CSS options for it… – tamasgal Jan 27 '13 at 18:25
  • what kind of ccs options do you need? – Mohammed Shameem Jan 27 '13 at 18:26
  • Oh I got it, sorry. : ) I can access the element via CSS by using ".view-viewname caption"! – tamasgal Jan 27 '13 at 18:35

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.