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
794 views

Drupal Paragraph Type that references a Block from a View

I have a paragraph type that is called view reference, the field within view reference is an entity reference to a view. I've recently upgraded my drupal site from 8.3 > 8.4.5. The problem is that ...
0
votes
1answer
86 views

How to create a list of paragraphs not linked to a node

Is there a way to create/edit several paragraphs (from within a UI) and use them grammatically by after. Here is my use case: I have a paragraph type made of 3 fields: Unit Source : taxonomy term ...
0
votes
1answer
609 views

How to make Paragraph label configurable

Drupal version 8.4.4 I have a paragraph type defined (For example Links), which only has one field of type link. And I have Entity reference revisions field in my node edit form. When I view the ...
0
votes
2answers
993 views

Taxonomy term listing of nodes with the term in a paragraph

I found similar questions but not an actual answer... This is my setup In Drupal 8: Node Paragraph Taxonomy term reference I would like to use the default ...
1
vote
0answers
296 views

Paragraph “view” access error

I have a weird issue. I created a custom profile using the Profile module. This profile has some classic fields and some paragraph type fields. I assigned permissions to a role to create profiles and ...
1
vote
1answer
1k views

Programmatically create a paragraph entity reference field

I need to create a config page, that is able to add social media information ( name and icon ), the user must be able to add as many social medias as it wants. To do so, I'we created a paragraph with ...
1
vote
2answers
1k views

How to get token of parent entity in paragraph?

I have a paragraph, which is referenced by a node. Now I am trying to pass field values of node to the paragraph using tokens. I'm only aware of [paragraph:parent_id] and [paragraph:parent_type] but ...
2
votes
0answers
1k views

How do I get translated paragraph values?

{% for item in contents.hotel_attractions.field_banner_image_slider %} <h1>{{item.entity.field_main_caption.value}}</h1> {% endfor %} field_banner_image_slider is a paragraph entity. ...
2
votes
2answers
2k views

paragraph template suggestion based on parent content type

I have two content type using same paragraph as field , though template code will be according to content type. How can i can have different template names for paragraph template depending on content ...
4
votes
1answer
5k views

Get paragraph id in field template

I have a paragraph template where I print a field, for instance : {{ content.field_products }} In this template, I can get the paragraph id with : paragraph.id() I need to pass this paragraph id ...
0
votes
0answers
295 views

Get multiple field id when using paragraphs

I created a paragraph (machine name date) with 2 fields (date_1 and date_2). When adding this paragraph (Entity Reference field_date) to my content type Agenda I choose the 'Allowed number of values: ...
1
vote
1answer
303 views

Drupal 8 paragraph access in views-view twig file

1.) I have added a paragrah with multiple field in my node form 2.) Now i have created a View and added the paragraph field and selected the Formatter as Rendered Entity 3.) In the preview section i ...
0
votes
0answers
261 views

How to change the display of a paragraph bundle using a custom modules hook_preprocess_entity?

I have created a paragraph bundle with text fields that ask for social media accounts(facebook account name, youtube account name, twitter account name) Then a custom module will grab that account ...
1
vote
1answer
210 views

Getting the available template variables in a custom module

I'm making a custom module that will hook into the default theme and override a template file. Like you can do in a custom theme. At this moment I can already use the template that was made in the ...
3
votes
3answers
4k views

How do I delete an orphaned paragraph node?

I have a paragraph node which seems to have gone rogue, since it does exist (I found it doing a search using Search API), but it does not appear as content, so I cannot delete it from the user ...
0
votes
2answers
413 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 ...
3
votes
1answer
472 views

Reference a block plugin, or Form, from a Paragraph?

Is there a way for a Paragraph to reference either a custom Form (built with Form API) or a block plugin that renders the same form? I only see a way to have a field that references either custom ...
0
votes
2answers
225 views

How to prevent display of specific paragraph types (bundles) on nodes

I have a content type with a paragraph field which has many paragraph types available. For one of these paragraph types, I do not want it displayed in the node because I am displaying it using a view ...
0
votes
1answer
138 views

Output all instances of a repeating field together

I have Paragraphs installed and am creating a content-type which has nested Paragraphs - so there is a Paragraph with a Title Field, a Body Field - this is then nested in a another Paragraph, so that ...
2
votes
3answers
4k views

Removing div wrapper container of paragraph field and get only the plain text in twig

I have a paragraph template in my custom theme as paragraph--home-page-carousel.html and when I write like this <span class="car-spec">{{ content.field_home_slide_snippet[0]|raw }}</span>...
0
votes
1answer
854 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 ...
-1
votes
1answer
86 views

order at will paragraph items of different paragraph type

On the module description it says : They [the end-users] can then add as many Paragraph items as you allowed them to and reorder them at will. I have created two paragraph types and created 2 ...
0
votes
2answers
598 views

How would I print out the first instance of a paragraph bundle in a node template?

I have a node type article with a paragraph field field_sections with the available bundles section_image and section_text. In my node.html.twig file I'd like to render out the first instance of any ...
0
votes
1answer
487 views

How to identify a paragraph? [closed]

Is there a way to identify a paragraph in Drupal 8. Like is there a function to get the type as paragraph in code level? I need to get it from a form alter function. My requirement is to get all the ...
1
vote
2answers
722 views

Render sub-paragraph in parent template

I have a paragraph that has a field of type paragraph reference to sub-paragraphs. Within my template, I need to access these sub-paragraphs and render the entity element. I have a loop that loops ...
0
votes
1answer
93 views

Paragraph how to get content level wise?

Using module https://www.drupal.org/project/paragraphs. On Admin side I have made content as a 3 level categories. Main Category, Sub Category, Sub Category. Each category have their content as well....
0
votes
1answer
601 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. ...
-1
votes
1answer
39 views

Paragraphs + selectlist based bg-color

I have a selectlist-field based bg-colors: yellow black blue I added this to paragraph bundle called 'Hero'. Now i got selectlist-field on this paragraph bundle. How do I print that yellow to ...
6
votes
2answers
8k views

Check Content Type in Paragraph Preprocess

I've written a paragraph preprocess function that is working perfectly. The only issue is that I need it to only work when that paragraph is embedded in a certain content type. function ...
2
votes
1answer
243 views

Best method of pushing content changes that contains paragraph fields from dev to production?

I manage a very big site with over 30k nodes and these nodes have many fields in them including paragaph fields with many sub fields in them too. Currently when testing and adding in content. I have ...
0
votes
1answer
633 views

Preprocess a Paragraph when Added to Content Type

I'm trying to disable a field in a Paragraph when it's added to a certain content type. Currently I'm using the following: function my_module_form_alter(&$form, \Drupal\Core\Form\...
0
votes
1answer
813 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(...
1
vote
0answers
121 views

Disabling a Paragraphs Field

I've run into an instance where I need to add a field to a Paragraph bundle but only have it accessible when it's been added to certain content types. I've tried hook_field_widget_form_alter but I'm ...
0
votes
1answer
446 views

Why is accessing paragraphs slow? Is there a better approach?

I'm trying to get the target_revision_id of a paragraph within a paragraph within a node. I can do this, but it is slow. $all_nodes = db_select('node','e')->fields('e',array('nid')); $all_nodes-&...
-1
votes
1answer
54 views

Creating a Slider paragraph type, how do I manage tabs “on the fly” within that?

I'm creating a paragraph type that represents a Slider. It has a couple of simple fields like "title" and "subtitle". It also has a variable number of tabs. The tabs are where the real content is. ...
2
votes
1answer
2k views

How to export paragraph bundles with features?

According to paragraphs documentation, it's should be possible to export paragraph bundles with features module, but whatever I search, I can't find any option in the features component section for ...
0
votes
1answer
245 views

Render parent paragraph depending on dynamic data from child paragraph (e.g. db query)

Here's my problem (D8): There's a content type concert. In a paragraph type concerts_list a list of upcoming concerts (concert nodes) is displayed. This concerts_list paragraph is referenced in ...
5
votes
1answer
516 views

Module's optional field config not imported on install

I've got a module which contains a config/optional folder which has the content: paragraphs.paragraphs_type.my_paragraph_id.yml field.field.paragraph.my_paragraph_id.field_my_field.yml field.storage....
0
votes
2answers
888 views

WYSIWYG editor on Paragraphs text field?

How do I enable the WYSIWYG editor on a paragraphs text field in Drupal 8? Currently, adding a text field (of any type) displays a single line input box. I'd like this field to be at least a multi ...
0
votes
1answer
376 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 ...
2
votes
1answer
664 views

Setting data values in a paragraphs field with multiple values via rules?

Over the last few days I've been investigating and experimenting on how to use rules to alter fields within a paragraphs bundle on a node. The paragraph field on the node allows for multiple values(to ...
-2
votes
1answer
51 views

MySQL error when creating custom theme hooks for Paragraph Module [Drupal 8]

I'm trying to theme a paragraph module on a specific page. The bundle-view suggestions wont seem to help here, so I am trying to create a custom hook suggestion to push my template. I tried both of ...
0
votes
1answer
213 views

How can I theme the Responsive Image module in a specific Paragraph Type

I have a responsive image field inside two different paragraph types. I am on Drupal 8.3.7. I want to theme the module in one paragraph type but not the other. I want to render a modified version of ...
0
votes
0answers
441 views

How can sort paragraph fields of custom content type?

I created a content type that’s combination of some typical fields and one paragraph type field and inside of this paragraph field also there are a set of multiple fields. The schematic structure of ...
0
votes
2answers
526 views

How to create a view displaying fields only from block it was created in (Custom Blocks Types + Paragraphs)

So I'm trying to create a view on a slideshow content type. I want to create multiple slideshows. However, whenever I create a slideshow, I want to run a slideshow that only displays the slides from ...
1
vote
1answer
704 views

How to create nested paragraphs items programmatically? [closed]

Basically, i am programmatically generating a node. Those nodes have several anidated paragraphs like this: -title parent -body parent -links parent -title child -body child -links child -...
1
vote
0answers
415 views

Change description of dynamically added field

I'm trying to change the description of fields in a from (/node/add/content_type). I found out it is possible to change the description with this code: function hook_form_alter(&$form, \Drupal\...
1
vote
1answer
163 views

Image field file upload issue

I'm using Drupal 8 and paragraphs together, and I've got an image field attached to an image paragraph. When adding content, if I nest this inside of another paragraph (as a paragraph reference field),...
0
votes
3answers
4k 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
390 views

Get the position of a paragraphs entity in a nested template

I try to build an accordion or slider element with Paragraphs. Therefore I create a Slider element which had slides. Unfortunately the first element should always looks different. I can do this with ...

1
3 4
5
6 7