Glossify + Paragraphs: Multiple glossary links instead of one per node

Created on 21 December 2019, over 5 years ago
Updated 3 February 2025, 3 months ago

Hello D8 community!

I'm using the module glossify on my D8 page. My nodes are paragraph-based cotenct pages. So there are severeal text and media field on one node. When i watch the resulting page after creation, i can see glossify links / tooltips on every first occurance in a paragraph and sometimes even twice when a word is written in upper and lower case. So when i have a glossify term "example" in several paragraphs i can see several glossify links / tooltips. That isn't beautiful.

I guess this issue has a simple reason. Glossify terms are managed by the text filter module. So each text field is looking for it's first glossify term occurance and marks it.

I'd like to have an glossify module that allows me

  • marking first glossify term occurance in node (instead of first occurance in a text field)
  • deciding whether i'd like to mark header-marked up fields aswell or not

Have you any suggestions to me to meet my desires?

Regards, Erich from lower saxony!

Feature request
Status

Postponed: needs info

Version

3.0

Component

Code

Created by

🇩🇪Germany indigo-erich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇵🇹Portugal joao.ramos.costa

    joao.ramos.costa made their first commit to this issue’s fork.

  • Pipeline finished with Success
    2 months ago
    Total: 144s
    #426378
  • 🇵🇹Portugal joao.ramos.costa

    Hi,

    Here's a suggestion MR 43.

  • 🇵🇹Portugal joao.ramos.costa

    Currently, the filter setting option checks if the term has already been replaced in that filter instance (plus string transformations). What I added in the open MR was to check, in addition to this, whether it has already been replaced in the current request. I think we'd be fine with the latter, as I believe that's the rationale for choosing that setting. At the moment, I’m also checking it more as a POC, so let others test. let’s discuss!

    In that sense a new issue title and summary would be more appropriate, as any text instance rendered on the ‘page’ can use glossify filters, nodes, paragraphs, blocks, taxonomy terms… etc.

  • Status changed to Needs review 15 days ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Honestly I'm personally not a big fan of this additional complexity, but let's wait for further maintainer and community feedback.

  • 🇩🇪Germany Grevil

    I am pretty divided on this issue. On one hand I think it is solved pretty clever and definitely has its use case, on the other hand I am not quite sure if a filter used inside a format instance should know about content of other format instances (even if its of the same type and only during the same request).

    If we approve of this, we should definitly have a dedicated setting for this.
    I'd say we change the "first_only" setting from a checkbox (bool) to a select / checkboxes (string) option with three Options:

    • disabled
    • first_match_only
    • first_match_only_across_request

    Or something along those lines. Naming is far from being optimal.

  • 🇩🇪Germany Anybody Porta Westfalica

    Yep, that's also my point. If we put this functionality into a submodule (favourite) or at least a setting to opt into, I'd be happier...

  • 🇵🇹Portugal joao.ramos.costa

    Ok, I agree with a setting.
    I understand that a submodule would add a clearer separation, but would add more complexity with the current code we have in the base class. Taking care of in which content/entity instances it has been replaced, I'm not sure if it make sense too.
    But if @grevil meant how it is checked at current MR, well I'm not seeing how we can deal with it other way around.

    From my perspective, it makes sense that someone who chooses not to repeat the glossing of a certain term is referring to the entire page, in order to prevent that term from being marked more than once—like a reference in a book. But that’s just my opinion, nothing more than that :)

    I can work on current branch and let you guys review it.

    cheers!

Production build 0.71.5 2024