0

I created a content type that’s combination of some typical fields and one paragraph type field and inside of this paragraph field also there are a set of multiple fields.
The schematic structure of my content type is like below:

enter image description here

I want to have this ability to add some of this paragraph type and update this content type every time that I want.

However, in the 'add field' section of the view creation page, I can only select the main content fields. The fields that are part of the Paragraph are not selectable.

How can I get the fields from the paragraph so that I can sort them in the view results?

So my main question is:
How can I sort this paragraph field (with a set of fields inside it) based on the custom required field value automatically?

For example, I want to sort those paragraph filed based on paragraph_field_2 field.
Is there any better solution or method for doing this work, What’s your approach to it?
thanks.

  • Sounds like you want to use a View, rather than paragraphs. Create a custom type with the required fields, and sort by paragraph_field_2. Paragraphs are supposed to be ordered manually by the content editor. – Tim Sep 17 '17 at 17:59
  • Thanks, but this paragraph field with its inner fields can repeat, and I want to have multiple of this paragraph field in my node. – Mojtaba Reyhani Sep 17 '17 at 18:05
  • 1
    Create multiple nodes of content type B. Create a View that with the filter and sorting that you want. Embed the View in the node view of content type A. – Tim Sep 18 '17 at 9:00
  • @Tim: Thank you so much for your help and reply. Can you help me and explain a little more about your approach please, Thanks. – Mojtaba Reyhani Sep 18 '17 at 14:44
  • Why are you reordering paragraphs based on a paragraph value instead of just letting the user dictate the order in the UI? – Kevin Sep 18 '17 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.