I created a views to show all my products, in each product have a field named "Color", so now I want to group all product has same color. So now how can I get all grouping values,

For exam we have 6 results but just only has 2 colors : Red and Blue without Black one. 

My question is how can I get grouping values in this views (Red, Blue)

$view->some_thing->some_how ?

I want to put those values in View footer for my personal purpose

My View should displayed like this

--- View Content ----
Product 1
Produc 2
Product 3
Product 4

--- View footer
[RED] - [BLUE]


2 Answers 2

  1. add field in your views
  2. select display format
  3. like if you are select table format select your value like red in grouping field

enter image description here

  1. Add Color field into view.
  2. Now click on formate setting.
  3. Select the Color field as a Grouping field.

enter image description here

  • thank you so much, but do you know how to render grouping values programmatically, something like $view->how_to_grouping_values
    – Tung Can
    Commented Oct 6, 2015 at 18:11

Your Answer

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

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