Conversation
MagicPreview no longer replaces the MODX parser during a preview, so Fenom and other custom parsers render correctly. Core fields and TVs are marked with the new mpField snippet; ContentBlocks fields keep an automatic wrapper, or use the [[+mpClickToFieldAttributes]] placeholder in inline, @file and @PDO_FILE templates. Markers only appear in the preview panel, are never stored in drafts or cached, and drafts saved by 1.7.x are cleaned on first read.
muzzwood
force-pushed
the
click-to-field-fenom-compat
branch
from
September 19, 2026 05:23
f30f972 to
3c87046
Compare
muzzwood
marked this pull request as ready for review
September 19, 2026 05:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR just concerns the experimental "Click to field" feature.
We're no longer swapping out the active parser. This means that some fields need to be manually marked in your template/markup.
Core fields and TVs are now marked in the template (breaking change). Without the parser swap, MagicPreview can't find core fields like the page title or TVs by itself. You now mark them with a new snippet,
mpField, placed inside the element that shows the field:With Fenom:
The snippet outputs nothing except inside the preview panel, so it's safe to leave in live templates. Sites that relied on core fields and TVs being clickable automatically will need to add it. The setting's description in the manager explains this.
ContentBlocks still works automatically for most fields. Each field is wrapped in an invisible element that makes it clickable. A field template can use the new
[[+mpClickToFieldAttributes]]placeholder to put the click target on its own element instead of getting the extra wrapper:Where it works: templates typed into the field's settings, and
@FILEand@PDO_FILEtemplate files, including Fenom ones.@PDO_FILEfields:@PDO_FILEtemplates, the usual way to write ContentBlocks templates in Fenom, aren't wrapped automatically. Add the placeholder to make them clickable:Only the preview panel has click targets. Previews in a new window, and a draft's "View" link, now show a clean page. There's no editor beside them to scroll to anyway.