Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [paragraphs]

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

0
votes
1answer
24 views

How to query paragraphs content?

Does any one have an example how I can query the paragraph entity type of a given node ? Let's say I have a node that contains a field 'field_paragraph' that is linked to the paragraph module . How ...
1
vote
1answer
53 views

Change title of certain paragraphs in a form

Please see the attached pictures. In one of my projects I have a taxonomy, which users can edit and add data. It has multiple tabs (see picture one) and each tab has multiple fields in which ...
1
vote
0answers
27 views

How to hide paragraph with data?

I am using paragraph module. Named Address: It has fields address 1, address 2, state, country. (User can add unlimited addresses) While creating the node, I have added 2 address. While edit, I ...
0
votes
0answers
37 views

The “paragraphs_type” entity type did not specify a access handler

When i try to access paragraph type page i get following error. Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "paragraphs_type" entity type did not specify a access handler ...
0
votes
1answer
33 views

Add/List/Edit paragraphs while add/edit node

I have installed paragraph module. I have paragraph called Address contains relevant info. It is attached to node. Per page/article I have more than 100 address. If I use default Paragraph Classic ...
0
votes
0answers
44 views

How do I join two paragraphs?

I have 2 paragraphs: 1)p1 with fields: pid, ptype 2)p2 with fields: pid, ptext, pimage I want to show a table with all the fields pid, ptype, ptext, pimage using views. How can I join these ...
1
vote
2answers
54 views

Trying to access and print the values from the fields within Paragraph

I'm having trouble trying to access and print the values manually within the Paragraph. This is a snippet from the paragraph field template I have created. I wanted to access and print values manually ...
0
votes
0answers
31 views

Editing contents of custom block referenced in paragraph type, doesn't reflect changes in node where displayed

So, I have a Custom Block type, let's call it Sidebar Links Block. In an Article, we have a Sidebar paragraph type that allows quite a few different entities, one of which is the Article Sidebar Links ...
0
votes
1answer
57 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
23 views

Paragraphs using dependent fields

I have the following contents and taxonomies set up: Army - Content Unit Type - Content Unit - Paragraph type Factions - Taxonomy The Army content type contains a paragraph type Unit which ...
0
votes
0answers
18 views

Footnotes module not working properly with Paragraphs module

When using Footnotes with Paragraphs, the module puts footnotes at the bottom of each of the paragraphs rather than at the end of the page. Is there any way to change this?
0
votes
1answer
18 views

How do I use a views data with a paragraph? [duplicate]

I have a content type with dynamic content block section. Each block section is managed by paragraph bundle. Let's explain using an example to make more clear- Content type name is Employee. A ...
0
votes
0answers
16 views

Views Entity reference permission issue for anonymous users

The issue comes when I used views reference field in paragraph type. Contents are added from admin side and views reference field displaying views id in the frontend for admin users. But this display ...
0
votes
1answer
79 views

Adding Constraint to Paragraph field

I have a Content Type with a field that references 6 different paragraph types. The field is set up to accept unlimited values. For one of the types I would like to have exactly four values added. ...
1
vote
1answer
47 views

How do I programmatically update a UUID?

Reason: Receiving uid does not exist error. Upon investigating, this error appears only when we edit or save the preexisting columns paragraph. If we create new columns paragraph, the error doesn't ...
0
votes
1answer
34 views

Two different editor in one content typ

is there a way in drupal 8 to use two different editors (CKeditor with two different buttonpanels or two differently allowed html tags) in one content type? I have created a content type of a text ...
0
votes
1answer
55 views

Paragraphs module decoupled structure

I'm looking to use the Paragraphs Drupal 8 module with a decoupled installation of Drupal 8 but would like the structure made in the admin area to be output in the JSON API responses. How can I ...
1
vote
1answer
28 views

How do I create a jump link to a paragraph item?

I'm trying to create a jump link to the paragraph item. This is what I tried create a compact display of the page just printing out a title and short summary. using the advanced text formatter I ...
0
votes
0answers
32 views

Paragraph containing an entity reference field as a select - Show options by something other than label

I have an author content type. I have a book content type. I associate multiple books with an author by having a books paragraph field in the Author create / edit form. In my Book Paragraph field I ...
0
votes
1answer
24 views

Custom form from scratch in template

I have a paragraph that I fully themed into a contact form with the necessary tags etc... Now my question is: How do I add the actual functionality to this? Because right now it's just plain html in ...
0
votes
1answer
29 views

How to show in a view the total number of paragraphs for a node?

I have a content type with a field of type paragraphs, with possible unlimited values. I need to show the total number of paragraphs for every node, in a column, in a views (table of fields). It seems ...
0
votes
0answers
20 views

Access to a block view in a paragraph

I created a paragraph in drupal which has a reference to a block. In the preprocess I did : $variables['bloc_video'] = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($bp); ...
0
votes
1answer
58 views

Pass hidden fields using drupalSettings to Twig template

We have a paragraph field (field_pr_custom) on the Basic page content type that has a custom twig template, pr-custom.html.twig. In the twig template, we need to pass in an array inside of a <...
0
votes
0answers
21 views

How do I show all paragraph items?

My project user profile has a paragraph with 3 columns (Lesson, Experience, Price) which shows a teacher's private lesson prices. I want to show all the teacher's lessons, but in a view I am only able ...
0
votes
1answer
24 views

Groups and Private File Visibiility

I have created a content type Agenda - the body is paragraphs - there are two types: (1) Text and public files and (2) Private Files. The fields work properly - Anonymous cannot see Private Files. ...
0
votes
0answers
23 views

Make Views table header with multiple values field sortable

Following this answer I was able to create a sortable Views table using Paragraphs relationships. I need to do so to make the related values sortable. So I try to make a reference to the second value ...
0
votes
0answers
59 views

Get paragraph bundle (paragraphs_item) value for migration

I am migrating node from D7 to D8 but I need to get the paragraph body value and concatenate it with the value of the body. Here is a dump of the node: object(Drupal\migrate\Row)#1848 (8) { ["...
1
vote
1answer
207 views

Controlling a dependent field in a multi-instance paragraph

The fields below are part of the node/add node/edit forms of my custom node type. The paragraph field_para_city contain one field_city. (I later need to add other fields in the paragraph). The user ...
0
votes
1answer
29 views

Add paragraphs item to user entity

I want to create a new paragraph item to a user bundle. This is the code: $name = "Test"; $userdata = user_load($user->uid); $paragraph = entity_create('paragraphs_item', array('field_name' => '...
1
vote
1answer
52 views

Add a class retrieved from a sibling field to responsive image

I have a Profile paragraph type that has the following fields: Profile Image [Responsive Image Field format] Profile Headline [Plain Text] Profile Description [Plain Text] Rounded Profile Image [...
0
votes
1answer
41 views

How do I get the field definition of a paragraphs image field

I need to get the resolution of the image using getFieldDefinitions(). For normal fields I can get the field definitions with below. $fieldDefinition = \Drupal::entityManager()->...
0
votes
1answer
62 views

How to print paragraph field values in paragraph template?

I'm trying to output paragraph field values in a sample paragraph template, but it does not work. I created a twig template in paragraph/paragraph--article--default.html.twig I have a field called ...
0
votes
0answers
52 views

Formatting Paragraphs in json in my drupal powered REST API

I'm using Paragraphs to organise my content. A Project has many paragraphs. Each paragraph can be of type Text or Image (thanks to the paragraph type feature). I want to expose my content to a REST ...
0
votes
0answers
71 views

Ability to migrate or import/export paragraph bundle from one site to another

I have several custom paragraph bundles containing a large amount of customization. I do not want to re-create them. Is there a module that allows me to export a paragraph bundle and then upload it to ...
-1
votes
1answer
37 views

How to let content editors use pre-defined block-like content?

In wordpress (gutenberg), content editors can choose some kind of pre-defined blocks to their content. If I have content editors, that can create new nodes, I want them to be able to add such blocks ...
0
votes
1answer
19 views

Change input value on click when there is more than one paragraph

There are two fields on my paragraph. A number field A text field I want to change the value of the text field when I click on the number field. Here's my script so far which is only good on ...
0
votes
0answers
39 views

Paragraph field titles showing even when set to visually hidden

I am using the following code to render a paragraph entity in a twig template: {{ content.entity_name}} A second template renders the paragraph's fields correctly using: <h2>{{ content....
0
votes
2answers
203 views

How to load paragraphs fields in hook_form_alter to disallow access?

I have a field inside a paragraph referenced in an taxonomy term. /** * Implements hook_form_alter() */ function custom_general_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $...
0
votes
0answers
33 views

How can paragraph type's fields display in two different node fields?

There is a paragraph type 'paragraph01', it contains two fields: field_paragraph01_01 and field_paragraph01_02. And a content type contains two node fields: field_01 (referenced paragraph01),field_02 ...
0
votes
1answer
49 views

Views contextually filtered by terms in paragraphs

TL;DR, Below are the structure of content types, paragraph types and taxonomy in my site. Taxonomy vocabulary - Category Terms - Sports, Politics, Business Paragraph type - Multi Article Fields - ...
0
votes
0answers
112 views

Using views field formatter with paragraphs

I've got a question that is a worry to me. So what do I want to do? I'm using drupal 8 with the paragraphs module. I want the content creators to be able to add an unlimited number of paragraphs that ...
0
votes
1answer
113 views

Get pre-processed data from nested Paragraphs

I am new to Drupal and building a theme with Drupal 8 + PatternLab. Instead of printing the actual paragraphs, I just extract the data from the fields and pass it to the front-end twig modules. For ...
2
votes
1answer
213 views

How can check if a field is empty in a node template?

I am using Drupal 8. I have a paragraphs field (field type: paragraphs of reference revisions) in node template, I tried lots of ways to check if the field is empty (purpose is to show the field only ...
1
vote
1answer
135 views

How to programmatically get the field cardinality [closed]

Is there any way to get the number of paragraphs' repeating limit for the entity's field which those paragraphs depends on? I'm writing a code which creates paragraphs according to the data taken ...
-1
votes
1answer
84 views

How do I add an existing paragraph field to another content type programmatically

I have a paragraph field that is already used in a content type. I need to add that paragraph field to another content type using the same field that I was using in the previous content type. How do I ...
1
vote
2answers
49 views

Why can only administrators see blocks?

I'm using the Paragraphs and Block field modules to display a list of nodes within the content of a page. This works great while authoring, but as soon as I log out from the administrator account, the ...
0
votes
0answers
14 views

Link an Image field to a colorbox popup text field in pargraphs

I created a paragraph that collects an Image and some text in long format with no summary. How can I configure this so clicking on the Image displays the long format text in a colorbox popup? I can ...
0
votes
1answer
110 views

Unable to fetch paragraph's multi field values inside node twig

I have a content type as "worker". I have a Paragraph "test" and I am referencing "test" paragraph inside my content type "worker". This allows multiple values to be saved. How can I get the multiple ...
1
vote
2answers
373 views

How do I access paragraphs with the JSON API?

With the JSON API module, I am trying to access paragraphs. In the JSON object is does not allow me to access the nested paragraphs. How would I go about accessing the paragraphs with the JSON API?
0
votes
3answers
54 views

How to print an image in a paragraph that references a node with an image field

I have the following scenario: I have a paragraph called Timeslot that contains an entity reference field to a content type called Class. That content type has an image field called Class Badge. I ...