Questions tagged [paragraphs]

Use it for questions relating to the Paragraphs module, not for text or body paragraphs.

Filter by
Sorted by
Tagged with
2
votes
1answer
744 views

Create any number of paragraph fields in a multiple value field on node create form

I have a paragraphs field that takes a term reference. I need to count how many terms there are for a specific vocabulary and then create that many instance of the paragraphs multiple value field for ...
1
vote
1answer
386 views

Export Paragraph bundles

I know drupal config:export:content:type is for exporting a content type. Is there a way to do this for a Paragraph bundle? drupal config:export:paragraph:type doesn't work.
3
votes
1answer
3k views

Programmatically append multiple paragraphs to entity reference field on node

I have a paragraph type that contains a text field and a text format field. I also have a content type that takes an unlimited number of paragraphs of this type. The paragraph type is called '...
1
vote
2answers
563 views

Pre fill multiple paragraphs while adding node

I want to prefill multiple paragraphs when user click on "add node" for specific content type. What would be a good way to do this ?
1
vote
0answers
192 views

Relation through paragraph seems to be exclusive

I implemented the following scheme: Publication (node) - Mention (paragraphs) - Project (node) Project is referenced by Reference Entity from paragraphs type and Mention is a paragraphs field (...
0
votes
3answers
5k views

How to set validation error for specific subfield of the paragraph type?

I've got paragraphs type with two fields which I've added as a field into my vocabulary. I've added validation function (#validate) into $form using hook_form_FORM_ID_alter where I'm validating ...
1
vote
1answer
579 views

How to know when a field is a paragraph

I'd like to know when a field from a node it's a paragraph, I only get the type, that it's entity_reference_revisions, I use this method to get the information: \Drupal\field\Entity\...
0
votes
1answer
917 views

Theming custom block type have multiple paragraph field

I've created a custom block type includes a paragraph type field and make it multiple. I've configured this block to display it only on the front page. I have a page--front.html.twig template in my ...
18
votes
4answers
12k views

How do I alter the behavior of the form fields contained within the paragraph field?

Using the Paragraphs module in Drupal 8, I am attempting to alter the behavior of the form fields contained within the paragraph field. This is so I can add behavior like AJAX callbacks, hide show ...
12
votes
3answers
23k views

How to load paragraph entity on node object?

I'm using paragraphs in my content type. I've created a paragraph type and added content. Now I want to load the paragraphs in a foreach. But nothing's showing up. $paras is empty: $node = \Drupal\...
1
vote
1answer
3k views

How to print/render nested Paragraph values to twig template? [duplicate]

I'm trying to figure out how I can render values from nested Paragraphs. Basically I have field/values from a Paragraph within a Paragraph I have tried experimenting and searching for answers but I ...
4
votes
1answer
2k views

How to show paragraph bundles of different types in a view of content containing paragraphs?

I am using the Paragraphs module and I want to show the paragraphs of one type at the beginning of the view and the paragraph of a different type at the end. How do I distinguish paragraphs of ...
2
votes
1answer
596 views

What is the difference between getValue() and referencedEntities() to fetch paragraphs?

What is the difference between using getValue() and referencedEntities() in order to get the paragraph on a node? See example below. Both examples are used in a node template such as node--page--full....
1
vote
2answers
373 views

How can I print subparagraphs?

I have a content type with a paragraph field. That paragraph field has two paragraph fields which I will refer to as subparagraphs. I want to print one of the two subparagraphs depending on the flag ...
1
vote
1answer
248 views

How to print the URL path of a referenced node using paragraphs?

I'm trying to print out the url path of a node from a referenced entity paragraph field in my twig template however have not had any success so far. I have tried various common twig functions but with ...
0
votes
1answer
863 views

How to retrieve value of hidden field in twig?

How to retrieve value of hidden field in twig? PFB screenshot: I am able to retrieve value of "Partition Count" field when not disabled. But not able to retrieve it's value when disabled. Exact ...
0
votes
0answers
27 views

When the view has no result, there is an error

I created a view to display a block on my store page, but the page displays an error when the view has no result. If the view has a result, it works. What's the problem? When I go to my store ...
0
votes
1answer
412 views

Adding content to Paragraph Date Field Drupal 8

I'm programmatically creating paragraphs using the following code, but I'm unable to get the date value to store correctly within the date field. It seems to store within the database, yet on the edit ...
0
votes
1answer
386 views

content types vs. paragraphes types + taxonomy

I have quite a complex content structure and found the paragraphs module (in combination with taxonomies) can be very powerful for creating complex compound fields and dynamically reusing existing ...
0
votes
2answers
361 views

D8: The same content type, but different url path aliases pattern based on paragraphs. Possible?

I have several paragraphs nested into one content type. Users can add only one type of paragraph. Is it possible to create a url alias pattern based on paragraphs? For instance, I have paragraphs "car"...