localgovdrupal / localgov_base

The base theme for LocalGov Drupal websites.
8 stars 14 forks source link

Add support for layout paragraphs builder field formatter in front end #548

Closed andybroomfield closed 3 months ago

andybroomfield commented 3 months ago

Noting there is also a new experimental field formatter called layout paragraphs builder. This seems to be what Mercury editor is using behind the scenes. To work with Subsites, localgov_base needs to be altered to allow for it. Changing

  {% if node.localgov_subsites_content.value %}
    {{ content.localgov_subsites_content }}
  {% endif %}

to

  {% if node.localgov_subsites_content.value or content.localgov_subsites_content['#type'] == 'layout_paragraphs_builder' %}
    {{ content.localgov_subsites_content }}
  {% endif %}

Originally posted by @andybroomfield in https://github.com/localgovdrupal/localgov/issues/711#issuecomment-2120226369