We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [paragraphs]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

How to create paragraph of particular type using JSONAPI?

I am able to GET the data using endpoint "site_url/jsonapi/paragraph/text". But I am not able to create a new paragraph of type text. Its always giving me error "403 forbidden". I have tried all ...
2
votes
1answer
127 views

How do I get paragraph fields text data without the <p> tags?

I am trying to pass my paragraph field data from Drupal to a component that I have created in Twig. My component echos out data like so: <p class='my-custom-class'>{{ my_var }}</p> In my ...
0
votes
0answers
26 views

How to wrap Paragraph fieldgroup horizontally

I want to display a few fieldgroups inside of a Paragraph side-by-side horizontally when in node edit form. I gave each fieldgroup the class .popular in the GUI in manage form display. The fieldgroup ...
1
vote
0answers
26 views

Is there a way to add CSS classes to Paragraphs Add More submit buttons?

I'm using the buttons method to add more paragraphs and am styling the buttons via css in a custom module. I'm setting paragraph icons as background images for each button so an editor can visually ...
2
votes
1answer
46 views

is there a way to generate dummy content for paragraphs? [closed]

I am working in Drupal 8. Is there any way, with devel, to generate dummy content for paragraphs to visually get a feel for how things would look? Is there a module or script to accomplish that might ...
1
vote
0answers
18 views

Adding accessing getSummary within a paragraph

I'm using the Paragraph module as part of Drupal 8. I have the following method to load the individual paragraphs when i match on a certain type try { $query = \Drupal::service('entity.query')-&...
0
votes
0answers
75 views

Ajax call for autocomplete reference field

I do not succeed to fire the ajax when an autocomplete reference field widget is populated or changed inside a paragraph form. TO BE MORE CLEAR: I Succeed when using a simple select list but not when ...
0
votes
2answers
61 views

How to check if a referenced entity is being used in other places?

I have a paragraph component that has a single field (reference) that calls on other paragraph components. I'd like to remove one of the paragraph reference field options so that users do not ...
0
votes
0answers
24 views

Showing a View of a Paragraphs block in a node with contexual/relationship filters

I have a slightly complicated question. So i'm experimenting with nested paragraphs where the parent paragraph is a container for another paragraph. In this case, i'm making an Agenda/Event program ...
0
votes
1answer
22 views

Failed to import Bootstrap Paragraph sub module configuration

I tried to implement the Hero with Xeno Hero in the Bootstrap Paragraphs in Drupal 8. I encountered an error when I tried to import the config of the sub module. I am not sure if I do it the right ...
0
votes
0answers
35 views

Notice: unserialize(): Error at offset XX (removing Paragraphs)

I'm trying to remove Paragraphs and modules related to it manually (because I can't remove it completly from admin page). I'm using UTF8 without BOM in Notepad++ when editing key_value BLOB file that ...
0
votes
0answers
12 views

How to render two paragraph fields behind each other in a slick slider?

In my node content type I have two fields which containing different kinds of paragraph types. (How) is it possible to render the paragraphs of the two node fields in one slick slider behind each ...
0
votes
0answers
37 views

Sort by date in view with results from Solr Search API

I create release notes section for my website where I fetch a paragraph from the specific content type. I have configured one index with fields such as name or status. In addition to that, I added the ...
1
vote
1answer
38 views

How to update custom paragaph which is added to User Profile?

I have a requirement to create/update a paragraph which is added as a custom field in USER profile. After surfing here, i got how to update a paragraph which is connected to node. But I am not able ...
0
votes
1answer
45 views

Creating a Paragraph type programmatically

I have a custom module that is installed on a number of sites. In an hook_update_n function I would like to add a completely new Paragraph type (not actual instance of a Paragraph) to every site, ...
0
votes
0answers
37 views

Views paragraph fields in block Twig template

I understand that I can use content['#view'].field['field_name'].value(rowcount) to get a value of a field. But how can I refer to fields of a paragraph field, that is in a view block in a file like "...
0
votes
1answer
45 views

paragraphs_update_8018 takes very long time to finish

The paragraphs_update_8018 update takes very long to complete (we have over 1 mio. paragraphs), as of now it's already been over 1h40m and it's still running. EDIT: it finished after 1h47m My ...
0
votes
0answers
56 views

Programmatically creating paragraphs is extremely slow

I am adding paragraphs from xml file programmatically but it is extremely slow. for example I'm basically creating paragraphs like this: $row = ['field_title' => 'title', 'field_id' => 'id' .......
0
votes
0answers
30 views

Default Paragraph Config Per Content Type

We're using a paragraph for the hero/header of our site. Within the paragraph are a number of different toggles to define various options for the hero. I'd like to have it so that if the user is ...
0
votes
1answer
75 views

How can I programmatically get the image style of an image in a paragraph template?

I have an Twig extension that applies image style to an image and provides a URL for the processed image. The extension looks like this: protected function setImageStyleUrl($url_field_value, $...
0
votes
2answers
57 views

How can I add paragraphs to a translated node?

I have a problem with the Paragraphs module and translation. I'm using Drupal 8.7.7 and Paragraphs 8.x-1.9. When I add a translation to a node with a paragraphs field (unlimited), I can only ...
0
votes
0answers
48 views

How to use Paragraph components inside of Paragraph components

I have a component-based system using Paragraphs. I create the markup in Twig (Drupal 8), then pass the values of Paragraph fields to the component's properties. So for a super basic example: {# card....
-1
votes
1answer
75 views

Get array number of paragraph item in TWIG

I have a paragraph (Entity reference revisions) with multiple items. I would like to display the item list rendered. I only get the paragraph as element['#object'] (in a pseudo field). ...
-2
votes
1answer
42 views

How can I create a new Paragraph item programmatically in an Ajax form handler?

I need to add Paragraph fields programmatically to an entity in an AJAX handler. This is my AJAX callback and how it's added: function mymodule_form_alter(&$form, \Drupal\Core\Form\...
0
votes
0answers
73 views

JSON view (rest export)

I have a rest export view and this is my output: { title: "about", view: "[{"id":7,"field_history_json":7,"field_history_text":"sdfsfsdffd","field_history_year":3244}]" } My field "view" is a ...
1
vote
0answers
42 views

Programmatically add more 'paragraphs' in form alter ajax call [duplicate]

I have a content type called repair that has a multi paragraph field (field_products) called Products. In the create new repair form I have an ajax button that fetches N number of products and ...
0
votes
1answer
39 views

One field (entity reference - paragraph) with two display modes

I am having issue with displaying one field twice in my template having different display modes. I have a content type basic page with field field_gallery (which is entity reference on paragraph). In ...
0
votes
1answer
70 views

Custom formatter for paragraphs field

I want to build a custom formatter for a paragraphs field that renders some of the fields of the paragraph. However, I don't know how to access the single files of the paragraph field. So far I've ...
0
votes
0answers
19 views

Migrating without changing structure

I'm trying to to migrate Paragraphs content from my existing Drupal 7 site to a new Drupal 8 site. The content models are not changing. As one of the simplest examples, I'm migrating Paragraphs ...
0
votes
3answers
50 views

Attach different CSS classes to first and second link

I have a Paragraph type 'Call to action' with one link field field_link. I have another Paragraph type where I call the 'Call to action' paragraph as an Entity reference revisions field. With Allowed ...
1
vote
1answer
113 views

Export Paragraph bundle with Drupal Console

I know there is a command to export a content type config:export:content:type But is there a way to do this for a Paragraph bundle? Something like this isn't working config:export:paragraph:type
0
votes
1answer
151 views

Anchor links to paragraph content

I have some drupal 8 sites that make heavy use of the Paragraphs and Bootstrap Paragraphs modules. Some of my users want to be able to create anchor style links to specific paragraph items on pages. ...
-1
votes
1answer
43 views

I removed the module from my site and now I'm getting an entity type error

I have an issue where I removed the paragraphs and bootstrap_paragraphs modules from my site and now I am unable to access the admin or the site. It is saying that the paragraphs entity type doesn't ...
1
vote
1answer
28 views

How to delete paragraph when uninstalling the module?

I have been creating the custom module which have the paragraph configuration, when installing the custom module, the paragraph config will be stored in the database and then It will be available in ...
1
vote
1answer
271 views

Hide fields in Paragraphs conditionally using Form API #states

Because the Conditional Fields module doesn't work with paragraphs for Drupal 8, I've followed the instructions in Conditional Fields in Paragraphs Using the Javascript States API for Drupal 8 to hide ...
1
vote
1answer
71 views

Email misses fields from form [closed]

This is regarding a Drupal 8 site, specifically Drupal 8.7.1 and the "Contact" module (with Contact Emails, Contact Storage enabled). The issue that I'm running into is some of the fields are not ...
0
votes
0answers
33 views

Create custom webform when creating node?

I’m trying to find out if it’s possible to create webforms when creating nodes or paragraphs. I mean instead of choosing a predefined webform, then build it right inside the field. I figured that ...
0
votes
0answers
22 views

viewsreference child view Sample Code

Is there any example code for creating a new paragraph object with a viewsreference field and setting a view on the viewsreference field with its "type" and other display options set? Can't really ...
1
vote
1answer
154 views

How to filter a node view on a paragraph field

I have a content type "Lunch" containing a paragraph type field named "Ingredients". This is a multiple values field which store a prapgraph type named "Ingedients" => Taxonomy term + Quantity LUNCH ...
-1
votes
1answer
370 views

Retrieving value of paragraph type with entity reference revision through preprocessor

I have created a paragraph type which has field of type entity reference, link, plain text. Now I want to fetch the values present in these through the preprocessor.paragraph.inc and display it in ...
0
votes
0answers
41 views

How to get file fid value in paragraph and view templates

Hi i am trying to access file fid value in paragraph twig template file but cant access it. Though I can print file uri but I need to access fid of the file Here is my code in paragraph.pdfdocument....
0
votes
0answers
10 views

How to access the value of another field in the same field collection from a field template file?

In Drupal 7 I've customised a file download field in a template file: field--field-downloads.tpl.php Within the same field collection (using the 'field_collection' module: https://www.drupal.org/...
0
votes
1answer
100 views

Get node data from entity reference field

I have an entity reference field to a content type blog. I referenced a specific blog, but when I render that field in twig using {{ content.field_blog }}. I want to get the autor name and time when ...
0
votes
1answer
230 views

Migrate node with paragraph

I'm trying to figure out how migrating content from a Drupal 7 site to a Drupal 8 site works. I managed to understand how to create a custom module to migrate nodes with regular fields to my new D8 ...
0
votes
1answer
90 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
0answers
46 views

Conditional Fields inside Paragraphs not working

Am able to get the configured conditional fields in hook_field_widget_WIDGET_TYPE_form_alter() and trying to apply them for Paragraph fields but not working, below is the code(most of it copied from ...
0
votes
0answers
26 views

Update to drupal 8.7 caused paragraphs to display improperly

I am using bootstrap paragraphs (BP) as part of my project. When I updated to D8.7, the BPs that define layout (e.g. 2 column, accordion, etc.) stopped displaying. I then tried a roll back to 8.6 ...
0
votes
1answer
45 views

Need to alter “No Paragraph added yet. Select a Paragraph type and press the button below to add one.” message - Paragraph Module

I am using paragraph bundle and I want to alter this message with my custom text "Please click on below button to add data".
1
vote
2answers
231 views

Change autocomplete results based users selected checkbox

I have a drupal 8 site that uses the paragraphs module. In one of the paragraph is a field that contains an autocomplete field. It is already set up to reference a small list of Content Types. For ...
0
votes
0answers
140 views

Loop Paragraph types with all values in field--field-page-detail-paragraph.html.twig

I have two paragraph types called First Type & Second Type and added Image & Text fields on it separately. I have created the basic page & added the two above paragraphs(First Type & ...