0

I want to add a custom field for a paragraph item in display suite, but I don't know the name of variable.

I try a print_r($entity) and nothing is returned. How can I find out what the object name is?

  • Are you using the paragraphs module? – No Sssweat Dec 28 '16 at 10:10
  • Yes I am using that – Diana Dec 28 '16 at 11:07
  • Not sure if I understand your Q correctly. So I will just throw this out there. You can add fields by going to Structure >> Paragraph Bundles then click on manage fields (assuming you already have a bundle, if not create one, then manage fields). – No Sssweat Dec 28 '16 at 11:28
  • I know how to add them . I want to know how to display them in a specific way . So I want to use a custom display suite code field – Diana Dec 28 '16 at 11:29
  • I'm using a view and want to display the first paragraph of text type and the first paragraph of data type . But only the first one . Currently they all come out in the view – Diana Dec 28 '16 at 11:32
0

I'm using a view and want to display the first paragraph of text type and the first paragraph of data type . But only the first one . Currently they all come out in the view

In Views click on your paragraph field, mine is called "test".

Then in Multiple Field Settings, change Display to 1

enter image description here

  • thanks but i also want the first paragraph of type "text" and the first paragraph of type "image" . how do i do that – Diana Dec 28 '16 at 13:34
  • This should do that. Exactly how did you setup your stuff? This is what I did. In content type Article, I added a paragraph field with Unlimited values. Then in bundle I added a text field with 1 value and an image field with 1 value. – No Sssweat Dec 28 '16 at 13:56
  • how do you add those bundles to the view? I can only add fields – Diana Dec 28 '16 at 13:57
  • @Dianacastillo I'm not talking about the view, in Structure >> Paragraph Bundles, added a text field with 1 value and an image field with 1 value. Then all I did was add the paragraph field from Article, to the view. – No Sssweat Dec 28 '16 at 14:00
  • no I need individual paragraphs of type either "image " or "text" since they can add unlimited amounts of each , in different orders – Diana Dec 28 '16 at 14:34

Your Answer

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

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