featdd / dpn_glossary

Glossary extension for TYPO3

Home Page:http://typo3.org/extensions/repository/view/dpn_glossary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Self-Reference

marcel-mattern opened this issue · comments

Hello,
any words are reference on his self.

Word Example
Word: foo
Link to: www.example.org/foo/

On site foo we have the Word foo.
The Extension wrapped the word with a link to www.example.org/foo/

We had the same issue. As a workaround we replaced each occurence of the word itself by wrapping it with a class that is not allowed in parsing:

<f:format.html><v:format.replace content="{description.text}" substring="{term.name}" replacement="<span class='dpnglossary-exclude-tooltip'>{term.name}</span>"/>{description.text}</f:format.html>

But it is kind of a dirty trick and it depends on having vhs installed

Solved in be2874e

Greetings
Daniel

be2874e Solves this issue for Single view (and that is great), however not for list view.

We also frequently have this issue in list view...

@linawolf should'nt it be okay for the list to be parsed?
If you want to disable it you can still add the list page to the parser uid blacklist

@featdd I do not want to disable the whole list page from being parsed as this would remove cross references. I would however want to remove SELF-references.

currently we are doing this in List view with

<f:format.html><v:format.replace content="{description.text}" substring="{term.name}" replacement="<span class='dpnglossary-exclude-tooltip'>{term.name}</span>"/>{description.text}</f:format.html>

However it would be great to have an option to remove self references in List View as well. Making texts in easy language for mentally impaired we often have to repeat the word itself multiple times in its description. Linking each appearance to itself makes a very unruly picture. But we still want to link to other words that are neither synonyms nor equal to the current term.

@linawolf That sounds a bit more tricky, I have to think about how to solve this

Hi @linawolf,

I don't really know how to solve this properly except to add some data attribute with the id of the term list item.
But this doesn't look like a good solution to me as this specific issue is kind of a an edge case.

If it really disturbs you in the list page you can still limit parsing wrapping the list with a forbidden class, which can be configured.

I'll close this issue as I mentioned a workaround above, but let me know if you have a better idea.

Greetings
Daniel