Hey Josh, it’s a slightly complex build.
terms in reference to the linked words, and
definitions in reference to the pop-up content.
If your count of definitions is low, in the hundreds max, the best approach I’ve found is-
- Create a cms collection with your terms and definitions
- Build a separate cms collection on the page containing your definition modals, each with a trigger button. Build this out and make sure the triggers work correctly to open the correct modal. ( see cloneable )
- Hide the definition modals & trigger buttons
- Link your terms **
- Custom code to trigger the term-specific definition popup
** As term triggers, I like to create it as a
##term link, so that it’s easily managed in the designer, and the script easily knows how to wire up the appropriate trigger button.
Here’s a nocode lib I’ve built to simplify the trigger wiring, so that a link to
##coffee would click the associated button with the matching name in its SA5 attribute;
The cms modal construction here is the hardest part, use this cloneable as a guide;
Hey Josh, it would take quite some time to unpack and debug your setup, if you need some pro dev help, drop me a message.
However I’ve added some notes to my post above, and a cloneable on the CMS-driven modals setup.
Thanks Michael - the cloneable is helpful. I will keep trying and reach out again if I get stuck!