@mel47 Hi Mel, glad the module is working well for you! You can change the way links are created or prevent them entirely using the hook TextformatterPageTitleLinks::buildTitleMarkup (see the link for the documentation). This method is called for every title found in a text field and returns the HTML to replace the link. You can overwrite this to just return the title in certain conditions, which means no link will be created. Here's a hook that will keep track of which titles have already been linked and prevent more than one link per occurance of each page title:
// limit automatic links to one per individual title, even if the title appears multiple times on the page
wire()->addHookAfter('TextformatterPageTitleLinks::buildTitleMarkup', function (HookEvent $e) {
$title = $e->arguments(0);
$page = $e->arguments(1);
$options = $e->arguments(2);
// keep track of all the titles that have already been linked
static $alreadyLinkedTitles = [];
if (in_array($title, $alreadyLinkedTitles)) {
// if the title has already been linked, overwrite the HTML markup with the plain title
$e->return = $title;
} else {
// otherwise, just add the title to the array of linked titles
$alreadyLinkedTitles[] = $title;
}
});
A couple of caveats:
The static array will not distinguish between fields, so this will limit the automatic links to one link per title on the whole page, not one link per title within one field (though it sounds like this is what you want).
If you access the same field multiple times in your template, it will only contain links the first time.
Another solution, if the word you're repeating multiple times is very short, you can just use the minimum length setting to prevent it getting linked, or use the hook above to prevent automatic links for a few specific pages.
I hope this works for you! If you need even more fine control, it might be simpler to create the links manually or use another module as suggested by @bernhard.