4

I am working on a Drupal 8.3 installation and I want to create a single content type for each organization to be able to update their own content on the site (using the core permissions on content types).

For each content type, I want to use an entity reference revision field (Paragraph) and have the view display based upon the type of entity being referenced (there will a limit of one). I tried looking at using conditional fields (not production ready) and taxonomy term in the content type (not able to force matching of term to paragraph type).

I was hoping there was a way to build the filter criteria based on the paragraph type but only target_id and target_revision_id are selectable.

The brute force approach would require I create 6 content types per organization, but having over 100 content types seems overwhelming effort to create. Is there another solution to keep this DRY and easily understood for novices to add content?

3
  • I'm not sure what you are asking about, the title says views filtering, the question ends with adding content?
    – 4uk4
    Apr 13, 2017 at 7:10
  • I want to create a view filtering on the Paragraph type but I do not see how to do that in the filter criteria. Adding a field on the content type to filter on would be redundant and error prone for content creators, and creating dozens of views seems counter productive (contextual filter would come in handy) but that all builds on the base view filtering on the content type having a particular Paragraph type. Apr 13, 2017 at 12:18
  • OK, I've already drafted an answer for the view filtering part. Is that what you need to know? If not, please explain how this is connected to the adding content part.
    – 4uk4
    Apr 13, 2017 at 12:59

1 Answer 1

4

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.

0

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.