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 votes
0 answers
21 views

How do I move the scroll bar to the edge of the right side? [closed]

The scroll bar is on the right edge of the content, but I need it to be on the right side of the whole page, like how it is on most sites. Is there a name for this? How do I fix this?
voluminousdeceit's user avatar
0 votes
1 answer
51 views

How to use node context in custom block plugin to get correct revision for node and its fields?

Background information for this question can be found here: How to have a different hero image per node? I have written a custom block that takes the data from this "hero" paragraph and ...
Jordan's user avatar
  • 27
0 votes
1 answer
65 views

How to have a different hero image per node?

What we want: Users should be able to choose an image, add call to action links, and a few other options when setting up a hero for the specific page they are creating. We have three different content ...
Jordan's user avatar
  • 27
0 votes
1 answer
24 views

Displaying parent field value in field.html.twig template from nested paragraphs

See attached please. Using field.html.twig and paragraph.html.twig, Paragraphs 8.x-1.16 Stable release and Drupal 9.5.10 field.html.twig: {# /** * @file * Theme override for a field. * * To ...
rachel_001's user avatar
0 votes
1 answer
102 views

Display paragraph field value in field.html.twig - Paragraphs module

I need to display a field value available to paragraph.html.twig in field.html.twig. I have a paragraph type called buttoncontainer with a field name called field_background_color. I have a paragraph ...
user avatar
2 votes
1 answer
32 views

How can I get the untranslated field value from a translated paragraph?

Normally you can't have different paragraph items per language so I simply want to hide selected paragraphs depending on a field value in the paragraph. I added an untranslatable list field listing ...
leymannx's user avatar
  • 17.6k
1 vote
1 answer
84 views

Opening a nested paragraph in a modal window

I have a paragraph (image with some fields) inside a parent paragraph. Inside the template of the parent paragraph I'd like to open the nested paragraph via link () in a modal window. How can I access ...
deelite's user avatar
  • 479
1 vote
0 answers
8 views

How can I add the hero section image in the View to REST_API?

Hello im using Drupal 9.5.9 version. How can I add the hero section image in the View to REST_API? I have created an api with Rest_API to fetch data from Views I have created. I have no problem ...
devr4n's user avatar
  • 11
0 votes
2 answers
49 views

How can I add a custom field?

I am using layout paragraph module. I have a "section" paragraph with the layout paragraph behaviour. I want to add a field Background color to the section. Should I add it inside the layout ...
Mira chalak's user avatar
1 vote
1 answer
44 views

Paragraph Entity Query returns too many results

I'm trying to find a paragraph that have a certain taxonomy term value and on a matching parent node. I tried the code below, but it always returns over 30 values, when really only one paragraph ...
Rene's user avatar
  • 101
-1 votes
1 answer
75 views

Content type with 3 paragraphs fields: How can I output to different parts of page.html.twig?

I have a content type called (My Page) with 3 paragraph types, for a slider to display images, for text to display text, and for sidebar content. (The sidebar is a <div>, not a Drupal region/...
user avatar
0 votes
0 answers
45 views

Paragraph field in view relationship

Created a paragraph type with field named "related literature paragraph" as entity reference and inserted this paragraph type to a content type called landing page for a field named body ...
Suba sekar's user avatar
0 votes
2 answers
62 views

Twig: display linkfield with optional title

I created a linkfield within a paragraph with an optional title. The textlink should only be displayed, when the title is not empty. I need the URL from the linkfield for another field (an image where ...
ase's user avatar
  • 1
1 vote
1 answer
44 views

Set new paragraphs to unpublished by Default

Is there a way, to set new Paragraphs to unpublished per Default? For Content Types, I can set that new Nodes are not published per Default (Structure -> Content types -> Tab 'Edit' -> Widget ...
mullzk's user avatar
  • 65
1 vote
1 answer
54 views

can a module introduce paragraph types and templates?

I'm building a very complicated paragraph layout with multiple levels of interconnecting paragraph types. At the moment, configuration and template files are all over the place. So, I was wondering if ...
Alimba's user avatar
  • 117
-2 votes
1 answer
30 views

How do I remove duplicate taxonomy field values in the paragraph display mode template?

How to remove duplicate values in this code, if they are in "{{ post.entity.name.value }}"? {% block paragraph %}{% block content %} {% for post in paragraph.field_post %} {% if ...
Владимир Помелов's user avatar
1 vote
1 answer
61 views

How do I stop Fields being rendered twice for a node with Paragraph Types using UI Patterns?

I'm using UI Patterns within Paragraph Types which is resulting in the Fields being rendered twice in the theme. I'm using a sub theme of the bootsrap5 contrib theme. I have a custom layout twig:- {# /...
Darren's user avatar
  • 293
0 votes
2 answers
101 views

Can't get real field value from paragraph

I need to get value from exact paragraph type in paragraph reference field in node, so I can use it in Twig. Here's my current code: function my_theme_preprocess_field(array &$variables, $hook) { ...
mixerowsky's user avatar
  • 1,606
2 votes
3 answers
106 views

Append new paragraph item to existing node

I want to append a new paragraph item to a existing node, which has previously a paragraph item. I just want to add another paragraph item with the previous one. But my script only updates the ...
Souvik Das's user avatar
0 votes
0 answers
20 views

How to display the output of the View as json in the list of articles which use paragraphs?

I have a content type Article which has a field_paragraph field. Also I created a Paragraph type: View Paragraph which has a View reference field When I create an article, in the field_paragraph field ...
Iulian Boiculese's user avatar
0 votes
0 answers
53 views

How to add an attribute to a paragraph button link?

I'm trying to reach a variable with the html attributes of a link in a twig file, which is used for a paragraph link. If I dump the button content, I can't dump anything past the object array. {{ dump(...
Zoness's user avatar
  • 1
0 votes
1 answer
103 views

Paragraphs field preprocess hook not called

To simplify this issue, I just have 2 hooks: 1. customtheme_preprocess_paragraph__registration_button() 2. customtheme_preprocess_paragraph__registration_button__default() When I access a node with a ...
Ivan Ginovski's user avatar
0 votes
0 answers
19 views

Taxonomy field not displaying in a Node built with Paragraphs

I have a node type called Profile. It includes a paragraph type called Person. The fields in that paragraph type are: Name (text) City (taxonomy field) Brief (text). Whenever I look at a published ...
tsitsi's user avatar
  • 1
0 votes
1 answer
157 views

How do I create a paragraph using a bundle class defined in another module?

I have a controller in one module that generates paragraphs that are using unique bundle classes that I want to be able to use in other modules. In my controller I have this $bundle_class = \Drupal::...
Matt's user avatar
  • 5,592
1 vote
1 answer
283 views

Removing orphaned paragraph references from the user

Setup Drupal 9 site has Users and each user has a Paragraph that contains "Phone" data. User => Phone Paragraph connection is made via field $user->field_phone_para. Issue Somehow ...
Raido's user avatar
  • 11
1 vote
2 answers
292 views

How to pass paragraph id from layout builder to view?

I have asked this question before but in a different, more convoluted context. This is a simpler example. I have a paragraph type which I use Layout Builder to define it's layout. In that layout I ...
liquidcms's user avatar
  • 1,174
1 vote
2 answers
143 views

How to loop through and build an array from each referenced entity [closed]

I’m trying to create a card grid component using paragraphs. I have a reference entity which references different card types with unlimited cardinality. I’m able to pull the values from the ...
Shawn W's user avatar
  • 111
0 votes
0 answers
82 views

How to target buttons to add a new paragraph field

In a form_alter hook I'm trying to target the buttons to add a new paragraph but can't seem to target the specific buttons. The buttons are multiple entity references with unlimited cardinality, but ...
Shawn W's user avatar
  • 111
1 vote
0 answers
53 views

TMGMT translations are not accepted when there is a pending revision in the default translation

Can someone please help with TMGMT (8.x-1.14) and Paragraphs (8.x-1.15) modules working together in Drupal 9.4.8 setup. There is a content type having a Paragraph entity reference revision field. ...
HarshB's user avatar
  • 13
2 votes
2 answers
1k views

How to display Media image with alt attribute in paragraph twig template

I'm trying to access alt attribute as in given example Get Media Image URL in Paragraphs Twig Template - Drupal 8 But there is an example how to access alt and title... That's easy, too. You should ...
Vitaliy K's user avatar
  • 109
0 votes
0 answers
57 views

How to determine entity where image field is housed?

I need to check if an image media field is housed in a paragraph to remove the alt attribute of that attribute. The same image field could be referenced anywhere. I could remove the alt field it ...
Binny's user avatar
  • 876
0 votes
1 answer
79 views

How can I attach a newly added paragraph to existing records? [closed]

While editing a form, I needed to delete some fields and add a new paragraph. The issue here is, the newly added paragraph is not initialized in the edit form and that makes sense because the old data ...
Mourad Tlili's user avatar
0 votes
0 answers
120 views

how to get field image of a referenced entity in paragraph template

I made a paragraph with a referenced entity field to a content type called "tools" Actually I can get the title and body text like that : <h3>{{ content.field_tools_and_services.0['#...
johndoe555's user avatar
1 vote
0 answers
426 views

Correct way to migrate multiple paragraphs from custom source

Drupal 9.4.5. Looking to migrate Drupal 7 books into Drupal 9 paragraphs. Will need to migrate multiple paragraphs into D9 multi paragraph reference fields. Below is outline of desired paragraph ...
SomebodySysop's user avatar
0 votes
1 answer
262 views

Is it possible to Migrate data directly into the paragraph entity?

Posted this in Drupal Paragraphs issue queue, but no response. Trying here. Drupal core 9.4.5. Paragraphs 8.x-1.2 Every tutorial on Drupal 8/9 paragraphs migration uses the destination plugin: ...
SomebodySysop's user avatar
0 votes
1 answer
179 views

Contextual filter from Taxonomy inside a paragraph

I have content-type (Destination) with a paragraph added as a component. This paragraph has a referenced taxonomy vocabulary (location). I want to display a list of nodes from another content-type (...
Tabestan's user avatar
0 votes
1 answer
197 views

Deleting the original content doesn't delete translated one [closed]

When I delete original content, the translated one isn't delete and I just can't delete it ("remove" button doesn't appears). These are the steps to reproduce the issue. Install the ...
Dharmesh Sojitra's user avatar
0 votes
0 answers
53 views

Fields only from the first paragraph

I have a node type with paragraphs. In a view I need to get fields from these paragraphs. But only from the first paragraph of every node. In the view I have a relationship to the field which ...
deelite's user avatar
  • 479
0 votes
0 answers
264 views

Media Library and paragraphs not working

I have a paragraph with multiple fields, one of them is a media field (document type). If I add a new paragraph and then add media I got "ajax error". If I add new paragraph and save content ...
Pedro's user avatar
  • 124
0 votes
0 answers
156 views

Show field when the other one is empty on Drupal 9 editing content

I'm pretty new on Drupal I probably only have one month using it. I have two fields on a paragraph type, "field_text1" is a Text(plain,long) and the other one, "field_text2" is a ...
tryingMyBest1's user avatar
-2 votes
1 answer
102 views

How to get field value from multiple items? Twig

{% for item in items %} {{ item.content }} {% endfor %} I need to get some values from fields in item (displayed in screenshot)
Valentyn Galetskyi's user avatar
0 votes
2 answers
282 views

How to convert paragraph library item (ContentEntityBase) to render array for Twig template

I'm attempting to render an array of LibraryItems in a twig template but I'm having trouble figuring out how to retrieve the render array. Currently my twig template looks like this {% set paragraphs =...
Matt's user avatar
  • 5,592
0 votes
0 answers
165 views

How to Migrate paragraphs from CSV one column with multiple values

I'm trying to import a CSV file into content type and paragraphs. But I can't get all the values stored in a cell. Here is my cell: 2022-07-13 2022-05-24,2022-06-06 2022-08-08 & 2022-07-16 2022-05-...
Buge's user avatar
  • 1
0 votes
1 answer
249 views

How to create a module which installs entity types from /config/install/….yml files?

I created lots of paragraphs which go with a theme. Everything works fine, and now I want to deploy this theme and the related paragraphs to several more sites. I exported the entity-types (node,...
Norbert Fürst's user avatar
0 votes
1 answer
110 views

Image inside paragraph being cached

I have a Paragraph type called image - that holds a media reference and also a field which describes how the sibling image should be rendered. I look at the value of the "field_image_style"...
Wayne Foster's user avatar
-1 votes
1 answer
186 views

Add paragraph value to referenced node [duplicate]

I have a paragraph with two field: Paragraph title [text field] Node [entity reference field] The node is displaying its title and an image. By default the Node title is a H2 heading. But I want it ...
Joost's user avatar
  • 1,218
0 votes
1 answer
2k views

How to add class to paragraph fields through preprocess hook?

I created a paragraph named flight-search-info-block with two fields: field_svg_icon and field_teaser_text. Then I created a custom block, where that paragraph was added as an entity reference field. ...
Aurora's user avatar
  • 11
0 votes
0 answers
69 views

I lose template suggestions when an ajax event is called

I'm generating theme suggestions based on the formdazzle module, I made my own variant because I needed another level of granularity of theme names and it works fine. Well, in the alter hook I have ...
chalo's user avatar
  • 421
2 votes
1 answer
479 views

Can paragraph fields in a node be sorted?

I have a node content type with a paragraph field with multiple values. The paragraph has a date and a text field. When I display the node, I'd like to sort the paragraph values by date. I've tried ...
pglatz's user avatar
  • 449
0 votes
1 answer
140 views

How to pass Block ID to a view?

I have a Custom Block type called HomeBlocks. This bundle has a paragraphs field which allows multiple paragraphs. I then place (using Layout Builder) an instance of this block type on my home page (a ...
liquidcms's user avatar
  • 1,174

1
2 3 4 5
10