Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andybroomfield opened this issue May 28, 2024 · 0 comments · Fixed by #549
Closed

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

andybroomfield opened this issue May 28, 2024 · 0 comments · Fixed by #549

Comments

@andybroomfield
Copy link
Contributor

andybroomfield commented May 28, 2024

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 localgovdrupal/localgov#711 (comment)

@andybroomfield andybroomfield changed the title Noting there is also a new experimental field formatter called layout paragraphs builder. Add support for layout paragraphs builder field formatter in front end. May 28, 2024
@andybroomfield andybroomfield changed the title Add support for layout paragraphs builder field formatter in front end. Add support for layout paragraphs builder field formatter in front end May 28, 2024
andybroomfield added a commit that referenced this issue May 28, 2024
Fix #548

Allows the subsites content field formatter to be changed to layout paragraphs
builder which then allows subsites to be edited in the front end, even if there
are no paragraphs present. This is important if using the front end theme
for content editing (eg. Using mercury editor).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant