Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
In the Bootstrap Paragraphs module, I use two different fields for Width and Background color options on every Paragraph bundle. These are turned into class attributes in the Paragraph bundle templates.
When field_layout is enabled, the Paragraph template is bypassed/ignored.
I'm not sure of the best way to approach this conflict.
Would it be possible to exclude certain fields, or certain entities from field_layout? Or have it an opt-in on the entities you want it on?
Thanks,
Jim
Comments
Comment #4
tim.plunkettComment #5
kclarkson CreditAttribution: kclarkson as a volunteer and commentedFor one second I thought that I was crazy that I could not select none option.
Similar to display suite I think it would make the most sense for their to be a checkbox that says: "enable layout". Then that check box allows you to select the different layouts.
On the flip side, it would also be good to have an option somewhere that says: Enable Layout by Default for all content. So maybe there is a settings option for the module.
Comment #6
K3vin_nl CreditAttribution: K3vin_nl as a volunteer commentedI agree that it would be nice to be able to control whether an entity is rendered via field_layout module or not.
For example I want to render (some) paragraphs via field_layout module, but I don't wat to render nodes via field_layout.
@thejimbirch I thought I had a similar issue, but it turned out that the template was used. However field_layout seems to move fields around.
So in my case content.field_primary_image became content._field_layout.content.field_primary_image this caused my previously hidden fields to show up again.
Comment #7
thejimbirch CreditAttribution: thejimbirch commentedThanks for the heads up @K3vin_nl
Makes me think I could rewrite my templates to have an "if field_layout module is enabled" section.
Comment #8
tim.plunkettSimilar issue for Layout Builder: #2936358: Layout Builder should be opt-in per display (entity type/bundle/view mode)