Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
For what I have tested, the module is only rendering 2 links?
If I use more keywords, they are ignored on a page.
Also I found that keywords within a list are ignored as well...
I've tried to search for a limitation value of 2 in the module code but I couldn't find it. (AlinkPostRenderer.php)
Why is that? Any suggestions or is there a patch to fix it?
Many thanks!
Comments
Comment #2
osopolarPlease take in account the xpath selector:
//*//p//text()[not(ancestor::a) and not(ancestor::script) and not(ancestor::*[@data-alink-ignore])]
This means it only replaces keywords inside paragraph tags. If you want to replace keywords somewhere else you need to modify the xpath selector. This can't be done in GUI but it is a setting, so it can be overridden in settings.php. A more general selector would be
//text()[not(ancestor::a) and not(ancestor::script) and not(ancestor::*[@data-alink-ignore])]
. There are applications and online tools like http://xpather.com/ to test the xpath.Alinks also looks for existing links, it does not replace keywords if a link to that keyword already exists in that content.
If all that does not work for you please provide more details.
Comment #3
bbu23 CreditAttribution: bbu23 at Ninja Coders commentedI provided a patch in the related issue. I'm not marking this as duplicate, but I think it should be.
Comment #4
DrupalDope CreditAttribution: DrupalDope commentedmarking this as a duplicate, it's the same issue as
https://www.drupal.org/project/alinks/issues/3042282