You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many ref tags keyed by IDs, which are never exposed in the Craft CP (esp. globalset).
Plugin developers cannot extend anything to their own ref tags/element types.
parseRefs needs to be manually called on ANY field that may contain a ref tag for consistent behavior
Brainstorming
I'm imagining a field-level option "Parse Reference Tags" (alongside "Translation Method"), that would automatically parse a field's output for reference tags.
That option could then also be an indicator to the field to render some kind of "parse refs UI/selector" – basically an elementIndex modal where you could search through any elements and pop a ref tag into your field.
Though it'd deprecate Rich Variables, I'd tend to agree. I think the UX for such a thing is the tricky part, though. I guess any Element could have a "Copy Rich Text Reference" or such, which could then be pasted into any RTF field.
The awkward part is that ideally, you have some more friendly GUI that lets them do this right there from the RTF editor (which is what Rich Variables does, but just for Globals).
which is what Rich Variables does, but just for Globals
Apart from links, which Redactor, et. al. uses – globals are the most common use-case. e.g…
client has a phoneNumber global that they want to include in a rich/plain text field.
The only good option it to use refs, but they have no way of knowing what the ref tag is (they need a global set ID, which you can really only get by looking at the DB).
A good first step might be fixing refs for multi-site, and providing a "copy reference tag" action for all elements, like assets have.
In their current state, reference tags feel more like a developer-centric stop-gap than a fully considered feature of Craft.
I would love to see reference tags become more of a feature (selling-point of Craft) for CP users.
Rich Variables takes a step in this direction, but I'm imagining more core-level support.
Current issues
globalset
).parseRefs
needs to be manually called on ANY field that may contain a ref tag for consistent behaviorBrainstorming
I'm imagining a field-level option "Parse Reference Tags" (alongside "Translation Method"), that would automatically parse a field's output for reference tags.
That option could then also be an indicator to the field to render some kind of "parse refs UI/selector" – basically an elementIndex modal where you could search through any elements and pop a ref tag into your field.
/cc @khalwat
The text was updated successfully, but these errors were encountered: