Hi,

I have used the paragraph module to create 3 paragraph types (Text, Video, Question)
Each of the types contains a field called category type that contains the values (optional, core)

I have created a content type Resource to which i have added a field called Resource Metadata of type Paragraph and which can store unlimited number. In the content page for Resources, I am able to add child Paragraphs based on the three type.

Next, I have created a view Resources based which filters based on the Resource content type.

I would like to further filter the view to include only resources that have paragraph category type set to Core.

When I try to add the Filter Criteria , i can only see the fields_resource_metadata:target_id and fields_resource_metadata:target_revision_id.

My question is
1) Is there a way I can filter by fields_resource_metadata.category_type == 'Core'
2) Is there a way of sorting on the resource_metadata delta, so that any changes in the ordering of the Resource Metadata is reflected in the view
3) Is it possible to output the paragraph type name into the view as well i.e. Text, Video, Question. If not i will have to add another field to capture the information which seems like duplicating information.

thanks in advances.

Comments

CptCasual’s picture

Go to the Advanced section of the view and add a relationship:

RELATIONSHIPS
field_paragraph: Paragraph

Then you can add filters for all paragraph fields including the field for the paragraph type.

Copied from ...

https://drupal.stackexchange.com/questions/233943/view-filtering-based-on-entity-reference-revisions-paragraph-type