0

I have got a view where I am displaying a view in a block. Basically, I want to display a list of nodes that have a few specific terms associated with it. So, for example, I want to show all nodes that have one of the following terms (red, blue, green, white). So, my block should display two fields with the following criteria:

Fields Content: Title (Title) Content: Tags (Tags)

Filter criteria Content: Published (Yes) Content: Has taxonomy term (or Black, Blue, ...)

Sort criteria Content revision: Updated date (desc)

My problem is, the result is looking fine, where it is displaying a list of all the nodes that fit the filters. However, I would only like to display the term in the result set and not all the terms that the node is associated with. So, right now, this is the what the block looks like:


|Title | Tags

|Node 3 | red, horses, yellow, dogs
|Node 5 | black, white, green, cats, rain, purple

|Node 6 | camel, case, blue

I would like the block to look like this:


|Title | Tags

|Node 3 | red
|Node 5 | white, green

|Node 6 | blue

So, in essence, display only those terms that are part of the result set. How can I accomplish this with Views? Any help would be greatly appreciated.

I have played around with the configurations in Views, like @Mohammed Shammem said, and I have gotten it to display only the colors I want. It is however, still displaying in separate lines despite selecting Group by Title under the Format settings option. So, now it looks like this:

Tags    Title
White   Node 1
Blue    Node 1
Black   Node 1
Red     Node 1
Green   Node 1

I am close enough, but would appreciate more help on getting the tags in one row.

The relevant screen shots:

enter image description here enter image description here

enter image description here

6
  • can you take a screen shot of your view along with the group by node title that you did. Feb 8, 2013 at 7:10
  • I have posted the images. Btw, from Kerala?
    – SN_26
    Feb 8, 2013 at 7:26
  • yes from kerala Feb 8, 2013 at 7:33
  • by the way you have exlude the grouping field the grouping field would show as a heading then you would use css to align it the way you want Feb 8, 2013 at 7:35
  • Nice, I am from Kollam. I have posted the images before and after exclusion, still not seeing how we would you css to put them in the same rows.
    – SN_26
    Feb 8, 2013 at 7:47

1 Answer 1

0

I would suggest doing the following.

Instead of displaying all the tags in one line display it in different lines. That is in the multiple filed settings you would choose it to display it on different rows. The result would be something like this

node 3 | red node 5 | white node 5 | green

Without the filtered nodes.

Now you would group it with the title field so that it would be displayed together.

To do the grouping you would do the following.

Click on the settings link towards the right of Format :

enter image description here

This would bring up a screen as shown below. you would select the field you want to group from the dropdown Grouping field Nr.1

enter image description here

9
  • Could you clarify how I would group them by title so it would only display the terms in the result set?
    – SN_26
    Feb 5, 2013 at 8:06
  • I will update the answer in a few minutes. Feb 5, 2013 at 8:09
  • I did exactly that and grouped by Title. However, now it is displaying each term (even the terms not in the filter) in a separate row. How can I just display the terms in the result set all in the same row. So each node will have one row in the table with only the terms blue, green, red, white displayed.
    – SN_26
    Feb 5, 2013 at 8:31
  • what type of view have you created is it a content view or a taxonomy view? Feb 5, 2013 at 8:32
  • It's a content view. I'll try and play with it and see if I could get it configured. Thanks so much for continuing to help with this issue.
    – SN_26
    Feb 5, 2013 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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