Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [paragraphs]

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

-1
votes
0answers
21 views

How do I integrate field groups to be multiple paragraph fields in a node

I have a scenario similar to FAQs that would be 4 fields: Section Title .... body .... public files private files These are used to create an agenda. I want the section titles to accordion with ...
0
votes
0answers
15 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
16 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
18 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
34 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
0answers
58 views
+50

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
27 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' => '...
0
votes
0answers
31 views

Question about migrating a field collection to paragraphs [on hold]

I have a field collection in Drupal 7, and I'd like to migrate its content into a Drupal 8 paragraph. I've read every single blog article and bit of documentation I could find on the subject, ...
1
vote
1answer
41 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
31 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
31 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
26 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
27 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
36 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
17 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
23 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
49 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
28 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
30 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
59 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
56 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
114 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
64 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
52 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
47 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
52 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
1answer
127 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
41 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 ...
0
votes
1answer
25 views

How to pre-populate paragraphs when creating a page [duplicate]

I have tried for some time to find out a way to populate a new page with a few paragraphs to save time on most of the pages (but which might change position or even get dropped for some pages) but so ...
0
votes
0answers
35 views

Paragraph type can't delete individual items

I use Paragraph module Version: 8.x-1.5. Somehow I can't delete individual items anymore? Is there a settings somewhere I missed?
0
votes
0answers
36 views

How do I get the paragraph fields values in hook_node_form_alter

I have a field named field_page_schedule which relates to an entity reference paragraph field and the paragraph has two fields named field_start_date_and_time & field_end_date_and_time. I need to ...
1
vote
0answers
81 views

Migration - Paragraph is not attaching to node content type

I have below code My data.csv id, title,location_place_1,location_address_1 1,"test","Test","India" /my-project/docroot/modules/custom/data_migrate/config/install/migrate_plus.migration.data.yml ...
0
votes
0answers
33 views

Dynamically set theme per block/paragraph

I'm looking to apply specific themes to individual items on a page - a different theme to the rest of the page. I realise this seems quite obscure, but the general premise is similar to a styleguide. ...
0
votes
1answer
43 views

Passing Image through hook

Background: Im working in Drupal 8 and I have a paragraph type that contains a title and an image and I am trying to pass it through the preprocessor hook so I can set it inside a html template. For ...
1
vote
3answers
277 views

Custom Theming Bootsrap Carousel with Paragraph Type

Background Info: I tried to create a custom theme for my carousel section and I am unable to get it to work. I have tried using the default carousel that Drupal comes with. I have tried using slide ...
0
votes
1answer
42 views

Different Templates for Same Field

I want to have two different templates for the same field on a node template. For example: <div class="navigation>{{ content.field_section }}</div> // uses paragraph--section.html....
0
votes
1answer
97 views

EntityQuery on nodes related by ERR and paragraphs

I have content type Publication which relates to content type Project using paragraphs: Publication [field_mention] -> Mention (paragraphs) [field_project] -> Project Now I want to show all ...
1
vote
1answer
127 views

Paragraphs Entity Type Causing Issues After Core Update

I am getting this error whenever I try to create a node on Drupal 8.6.2. Drupal\Component\Plugin\Exception\PluginNotFoundException: The paragraph entity type does not exist. in Drupal\Core\Entity\...
0
votes
0answers
29 views

Set Custom “Paragraph Type Icon” For Paragraph Type With Module During Install

Drupal 8.x I have a paragraph that is installed via a custom module, this is done with .yml files in the MYMODULE/config/install/ directory. I would like to have a custom icon added to the "Paragraph ...
0
votes
1answer
77 views

Confused about Owl carousel with Paragraph

I'm very new to Drupal and not (yet) familiar with the terms and namings. I came across a web site in Drupal 8 that uses Paragraph. I'm trying to reproduce the slideshow that apparently uses Owl ...
0
votes
1answer
139 views

Custom validation for paragraph field

I have a content type with one paragraph field which has a checkbox and a text field. By default, the text field is optional. I want to make it required when the checkbox is checked. Conditional ...
0
votes
0answers
16 views

Trying to get a paragraph bundle within an OG to use EVA display

I am looking for help getting a news block working for my website. I currently have: A paragraphs field on a content type where the user can add a "Department News" paragraph. The page it's being ...
1
vote
1answer
114 views

Paragraphs: referenced entity error on save

I recently updated to Drupal 8.6.2 and Paragraphs 8.x-1.3. I have a content type with a Paragraphs field. When I try to update an existing node I get the following error message: The referenced ...
0
votes
0answers
29 views

How to disable caching for a preprocessed template variable in a paragraph

I have a preprocess function for a paragraph that has a variable which contains a render array. I cannot seem to find a way to disable the caching of this variable when rendered on a page, it is ...
1
vote
1answer
164 views

Limit amount of adding a certain Paragraph per Content type

I use Drupal 8 Paragraphs module. I created a Content type Landingpage. I create some Paragraph types like Hero Image, Intro text etc. In the Content type Landingpage I created a Paragraph Entity ...
0
votes
1answer
247 views

Node body to entity reference revision (paragraph) field not working/processing

I want to migrate the Drupal 7 body of my blog to a Drupal 8 paragraph (field_stories_content which is Entity reference revisions). The body is to be assign to the field_stories_text_formatted field. ...
0
votes
1answer
65 views

How to programmatically update a paragraph field

Trying to get certain paragraph field of certain node updated with new value with the following code: function my_module_node_update($node) { if ($node->nid == '111') { foreach ($node->...
0
votes
0answers
39 views

Show specific number of items on paragraph field

I have configured a field like this: When I create a Node, the field shows like this: How can I, programmatically, start this field with two elements and not have to click on the "Add pet" button? ...
0
votes
0answers
20 views

Node not appearing in taxonomy list when taxonomy term is selected within a paragraph

When I had my content type have a taxonomy term field in it, you could select the term and that content would be listed within that taxonomy page. However, due to the need to group that taxonomy field ...