1

So I have four content types in each there is a field called offer, I intend to make a view to display all nodes of those four content types with offer value equal yes.

I have tried the following: I have made a view of the four content type and add the four fields as filters and make a new filter group but I can not separate content types so that I can group each content type with its field.

Is my approach right? What do I need to do?

Thanks in advance!

1
  • You should use the same field for all 4 content types (same machine name same table etc). Then you only need to add 1 field to the view instead of 4.
    – Beebee
    Commented Nov 21, 2013 at 10:40

4 Answers 4

2

If you are using the same field for all content types and want to display them all on the same view and grouped by content type. Here is the step by step.

  1. Create a view for all content type in Unformatted list or table.
  2. In Filter Criteria: Add the "Content: Type" and check the content types you wish to display
  3. In Filter Criteria: Add the "Offer" is equal to "Yes"
  4. In Fields: Add any field you wish to display, and add "Content: Type" set that exclude from display
  5. In Format Settings: Set "Grouping field" by "Content: Type"

This way, The view will list all those node content type with Offer equal to yes, and grouped by content type.

1

You need to add your offer field in single content type and add that existing field in all other three content types.

enter image description here

Then you may have different fields in every content types. So you may have to use display different format style for each content type. So for this add your custom format style in views. In screenshot I have given the example of teaser.

enter image description here

The you need to customise the format style. Go to Admin > Structure > Content Types > Your Content Type > Manage Display > Your Format.

enter image description here

0

You should create a view, as you have done, to display all nodes where offer == yes.

Next you want to look under Format and click settings (the gear icon) next to 'Format'. The first field will allow you to select the grouping field. Try that.

0

Try the "Grouping field" select box, it does a visual group based on a field. Look for it the 'settings' for the display's format(1st column, 'format' heading). You'll probably want to add a "Content: Type" field to group by.

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.