Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
layout_builder_iframe_modal
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
layout_builder_iframe_modal
Commits
b2bc5a7d
Commit
b2bc5a7d
authored
3 years ago
by
Jan Hug
Browse files
Options
Downloads
Patches
Plain Diff
Update README
parent
2abddfab
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+13
-4
13 additions, 4 deletions
README.md
with
13 additions
and
4 deletions
README.md
+
13
−
4
View file @
b2bc5a7d
...
...
@@ -10,14 +10,15 @@ more complex form elements like tabs, accordion, entity autocomplete,
media library or entity browser, the amount of work required to get everything
to look (and work) good can be huge.
This module
attempts to
fix this problem by rendering any
block edit forms
i
nside an ifra
me.
This module fix
es
this problem by rendering any
layout builder forms inside an
i
frame, with your admin the
me.
## Features
-
Completely isolated edit forms - no more CSS leaking
-
forms are rendered in the site's admin theme
-
Integrates seamlessly in the existing LB interface
-
Resizes modal to match the height of the edit form
-
Closes modal when the block is saved successfully
-
Scrolls to the previous position in the layout after the modal is closed
-
Works with translations (layout_builder_st)
-
Provides a new "Rebuild" action in the layout form
...
...
@@ -31,10 +32,18 @@ The custom ajax command handles setting up the dialog and attaches event
listeners to the iframe.
When submitting the block edit form and there were no errors, Drupal redirects
to the page provided in the destination parameter. This page
contain
s a single
to the page provided in the destination parameter. This page
include
s a single
line of JavaScript which uses postMessage to notify the iframe's parent window.
The parent window listens for messages and will then close the modal and
trigger a rebuild of the Layout, so that it reflects the updated content.
## Requirements
None, it should work with any standard Layout Builder setup.
## Differences to layout_builder_modal
layout_builder_modal also shows the forms in a modal, but it renders them
directly in the page, using templates from your frontend theme and without any
CSS from the admin theme. This is the same behaviour as core Layout Builder.
This module just renders an iframe that contains the form rendered by Drupal in
the admin theme.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment