codemonauts / craft-glossary

Glossaries for Craft CMS
Other
2 stars 5 forks source link

Tooltip not appearing #4

Closed CreateSean closed 2 years ago

CreateSean commented 2 years ago

Have added {% hook 'glossary-terms' %} to my layout template.

I've glossary items that match content in a redactor field. On the front end I have this:

{{ block.textSummary|glossary }} though {{ block.textSummary|glossary(educationDisrupted }} with glossary handle returns twig errors. Using the first line I can see that the appropriate terms are getting wrapped like this <span class="glossary" data-glossary-term="term-193863">Polish</span>

I can also see that this script tag has been injected into the page <script src="//localhost:3000/cpresources/7678b98/js/Glossary.js?v=1636640767"></script>

However the glossary definitions are not appearing as tooltips or in the source of the page.

In the glossary settings my tooltip template is set to exhibits/education-disrupted/_includes/tooltip.twig and that templlate is using the default suggested one from the docs.

Am I supposed to pull in tippy myself? the docs suggest that it will work as is without manually adding any tippy code.

Also is it possible to have only specific instances of a term linked and not every single instance used?

CreateSean commented 2 years ago

You can ignore this - I went with a different approach for my glossary that doesn't use a plugin.