Questions tagged [paragraphs]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
38 views

Paragraph's fields value loaded in a custom controller are in the default language instead of the current language

I made a custom controller that load a paragraph field from a node and then render some part in a template. The paragraph field field_title and field_description are translatable. The translation ...
3
votes
1answer
1k views

How can I display a paragraph field excerpt in a search result view?

I've spent all day and night battling with Search API (with and without Apache Solr) in Drupal 8. Does anyone know if you can use Search API to index paragraph content and then in a search views ...
0
votes
0answers
14 views

Forms states + Visibility + Paragraphs

I have two fields, Select list - field_country Entity Reference (Paragraph) - field_data (multi value) Form Display Settings - Title: Paragraph Plural title: Paragraphs Edit mode: Open Add mode: ...
1
vote
2answers
1k views

Is there a way to import Paragraphs with Feeds module (no code)?

Given a Content Type (a Node), which has a Paragraph field, which in turn has some fields on it, is there a way to import the Paragraph fields into the Content Type using Feeds (or some other method, ...
0
votes
2answers
924 views

How to render inside a paragraph template a specific view mode for that paragragh

You may say that I should just change the display settings but in my use case I need to include 2 view modes inside one template as the mobile and desktop version of the output require very different ...
0
votes
1answer
68 views

Ajax error when trying to add another paragraph

Drupal 8.9 and paragraph 8.x-1.11 My issue is that Ajax breaks when altering the #validate form. This is an issue for any form! It may have to do with my ajax, but here is my setup. I have a paragraph ...
1
vote
1answer
689 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
votes
0answers
57 views

Layout Builder and field_collection issue

I migrated all my field_collection content to the paragraph module without any issues, but Layout builder seems to be buggering up when I try to use it. I get: Drupal\Component\Plugin\Exception\...
0
votes
1answer
642 views

Migration of CSV into paragraphs fails with unexpected error

I try to import CSV files into a Drupal 8 installation but I can't manage to make the relationship to paragraphs appear. I followed the steps of this tutorial but can't figure out how to make it work. ...
0
votes
1answer
17 views

How to make a facet search on a taxonomy term contained in a paragraph contained in a content type?

On Drupal 8, I try to make a facet on a taxonomy term contained in a paragraph entity contained in a content type. Is it possible? My stack : Druapl 8.9.0 + Search API 8.x-1.17 + Facets 8.x-1.5 In ...
1
vote
2answers
572 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 ...
-4
votes
0answers
10 views

Hook for dropdown field within config pages

In my config pages, I have embedded a paragraph type which in turn has two fields. I want to write a hook for a dropdown field within the paragraph type , where I can show and hide other fields for eg ...
4
votes
1answer
815 views

Cannot import Paragraph based Feature into new site

Perhaps someone with a bit more Features expertise can help me here. I have a Drupal site with 25 or so Paragraph types that I would like to export (one by one) to its own contained Feature. I ...
1
vote
1answer
15 views

Display summary of paragraph text field in twig [duplicate]

I have a paragraph type called News. In this paragraph type I have a text field (field_news_intro ) with a summary. How do I display the summary in a twig template? content.field_news_intro.summary ...
0
votes
0answers
20 views

Views Data Export module duplicates node titles

I need to export a content type that has paragraph bundles. I'm using the Views Data Export module (in CSV format) to do the export. I am able to export the content, but not in the correct format. As ...
2
votes
1answer
14 views

grouped paragraphs by field not filtering to current language

I have a D8.9 multilingual site. I need to group paragraph elements, as well as filter them by page language and Content ID. But my language filter don't seem to work. I have content type "...
0
votes
0answers
10 views

Using paragraphs to show a few products on the same page with select dropdown

I have a few products under the same node. I am using paragraphs to implement them. The problem is that on the front end they appear one after the other instead of being able to choose them from a ...
1
vote
0answers
15 views

Approaches for multi-field values

I am using the Drupal 8 REST API to post content to a custom content type. I have a use case in which I need to post multiple values to a single multi-value field. If someone can show me how to do ...
0
votes
1answer
49 views

Add ajax on hook_field_widget_paragraphs_form_alter

I'm working with paragraph and I try to change a paragraph with AJAX. My content type have a content field which contains "section" paragraphs which can contain various paragraph types which ...
0
votes
1answer
32 views

How do I sort paragraph types?

Hello it is possible to order the output of the paragraphs for example Type of content Blog I create a blog details field that calls the type of paragraphs and there I select image and description In ...
0
votes
0answers
11 views

View with referenced nodes from field in the same paragraph possible?

I can not seem to figure out how to set up the correct contextual and relationship settings to accomplish the following: I have a node with a paragraph named slides. In the paragraph slides there is ...
1
vote
2answers
507 views

Migrate Paragraphs from CSV

I am migrating Paragraphs from CSV file. I have Paragraph called Text with two fields -> title and body. The problem is that I would like to also migrate translations for them, which currently don't ...
0
votes
2answers
474 views

How can I programmatically populate a drop-down list field's options?

I have a paragraph bundle with several fields, on of them being drop-down list. How would I go about populating this dropdown list via code, programmaticaly? I don't really know where to begin with ...
1
vote
1answer
876 views

Convert Field Collections into Paragraphs during Migration

I have a content type that uses Field Collections in Drupal 7. I am migrating to Drupal 8. Is there a way to convert the Field Collection Entity into Paragraph during migration?
2
votes
1answer
497 views

How to convert an image field to an entity reference field

We have Drupal Paragraphs using image fields that are media entities. When the media entity is updated with a new image the old images still show unless we manually edit each page, remove the image ...
0
votes
0answers
35 views

Own permissions for paragraphs and ECK entities

I have come quite far in my Drupal 8 development without needing to write much custom php code. However, I am using paragraphs and eck entities as referenced entities in content types. For users to be ...
0
votes
1answer
1k views

How to access weight of a paragraph in twig?

I use paragraphs with my content type. I need to show weight (order) value of each paragraph in my twig template. I can change weight with select box when I edit the node, but I can't figure out how ...
1
vote
1answer
387 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.
0
votes
1answer
59 views

Paragraphs Grid module settings ignored

I'm using the Paragraphs grid module to display multiple paragraph entities in a grid. I followed the getting-started video and created a test page (see below for the source it generated), but it ...
4
votes
2answers
788 views

Get paragraph delta/weight in template

I have defined a paragraph type that has a text field and an image field. At the moment the twig template is something like this <div class='paragraph_wrapper'> <div class='text-container'&...
0
votes
1answer
842 views

Creating paragraph entities and adding to a node

I am using the Paragraph module in and I need to programmatically create paragraph entities and attach them to nodes. Using the following code in a for-loop: $paragraph = new ParagraphsItemEntity(...
0
votes
0answers
28 views

Accordions not allowing nodes to save

I’m utilizing accordions in a large install and I cannot save nodes. When the save button is clicked it creates a required paragraph that is hidden in an accordion. When you delete the created ...
2
votes
2answers
2k 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 it does not allow me to access the nested paragraphs. How would I go about accessing the paragraphs with the JSON API? ...
0
votes
0answers
7 views

Adding new paragraphs without altering translation with Lingotek

I'm having problems while translating with Lingotek, if I want to touch any translation to fix it's fine, but when I add a new paragraph for it to be on the translated page it needs to be "re-...
0
votes
1answer
67 views

Specifying display of a new Paragraph type with images using HTML/twig?

I created "figure" Paragraphs type, which contains an image field and a caption field. How (from start to finish) do I specify in HTML/twig how to render this new Paragraphs type? As an example, how ...
0
votes
1answer
878 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 ...
0
votes
0answers
118 views

Programmatically add the argument to a paragraph view

We're using paragraphs on a Drupal 8.8.5 with paragraphs 8.x-1.11. To help relieve some data entry, I've created a module that auto-populate a custom content type, Student Page. This content type has ...
1
vote
1answer
145 views

Rendering a nested Paragraph's field using Twig

We are using the Drupal 8 Paragraphs module and are have a Paragraph which contains a Paragraph type field, called "Steps" (machine name fs_steps), allowing editors to add a number of "Step" ...
0
votes
2answers
50 views

Routing path with Entity Reference field

I'm working on a custom module (my_module) which provides some functionality to a specific paragraph type (my_paragraph) created from the user interface. In my routing file, I have the following ...
-1
votes
1answer
25 views

How can I make a multi-column content section with Paragraphs and Bootstrap?

How to adapt this code in php for Drupal 7? https://jimbir.ch/blog/making-multi-column-content-section-drupal-paragraphs-bootstrap drupal-paragraph-multi-column-field.html.twig {% for item in items %...
0
votes
1answer
21 views

Using a Paragraph field value as a View filter

I am attempting to create a view and paragraph combination that allows for site authors to customize the content that they want to display. What is currently working: Within my site is the content ...
0
votes
0answers
17 views

Translation Issue for paragraph and Views

For a couple of days, we are facing an issue in translating the paragraph. While creating the paragraph, we are not able to check the "Users may translate this field" field. So we are not able to ...
0
votes
0answers
15 views

Autocomplete for a reference field with taxonomy term content

I'm trying to create a Paragraph with a Views Reference field. The View itself has a context filter, which filters the node entities I created by the tid of a taxonomy reference fields. This all works ...
0
votes
3answers
33 views

Change CSS class based on number (length) of entity reference items, in a paragraph entity

In my paragraph twig file paragraph--call-to-actions.html.twig, I want to render and build up the entity reference items (the child items from a certain Paragraph type). There could be 3 or 4 items. ...
0
votes
0answers
28 views

Content editor user experience

I have nested content types and using the paragraphs for content editing. The possibilities are great, but from the editor's perspective people complain. I've tried to upgrade it a bit - installed ...
3
votes
1answer
508 views

How do I prefill a paragraph field in a node form?

I have a content type with a paragraph entity reference field and every time a user is going to add a node of this type I want to have the paragraph field already open and prefilled. I've tried with ...
0
votes
2answers
81 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 ...
1
vote
1answer
70 views

How can I programmatically set date field Month, Day, Year dropdowns in Paragraphs?

I'm setting a basic date field (and several other text fields) programmatically when creating a paragraph. The database is showing that it is getting my date, which is being stored inY-m-d\TH:i:s ...
0
votes
1answer
32 views

Alter paragraph fields in closed mode

I was wondering if there is a way to alter paragraph fields when the paragraph is set to "closed" in the Edit mode setting of form display. Because in that case the ...
0
votes
1answer
38 views

Paragraph contextual filter

I would like to create "related item" with paragraphs. I have 2 content type using paragraph field. This paragraph field has different options, like "quotes, related items, slider" etc. I want to ...

1
2 3 4 5
8