-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Only allow template part to be replaced if its a header or footer #40787
Conversation
Size Change: +365 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
If possible I would suggest using the template area instead of the tag name. |
Good point, I'll push an update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working well for me. I tested both user created template parts with different areas, and theme template parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Thanks, @jameskoster.
Currently the 'Replace' flow is enabled for all template part types. But it's only really useful for semantically related template parts, IE enabling the replacement of one header with another. For general template parts it's much less useful.
This PR updates the logic so that it's only possible for template parts assigned to the
header
orfooter
area to be replaced.We might consider re-enabling this in the future if the replace modal is searchable.
Before
before.mp4
After
after.mp4
To test