Board Thread:Support Requests - Getting Technical/@comment-1676371-20200222161913/@comment-9605025-20200306175530

Okay. I have edited the module so that you should get your desired output. I edited the example producer page so that I could verify the results and so that you could see them. I believe there shouldn't be any issues but if you find any, let me know.

Here is a top-level summary of the changes that have been made since the beginning of this thread. The previous version attempted searching based on page name. As noted in this thread, this was in issue if the module was used on a subpage. The issue of qualifiers is discussed in the next paragraph. It would grab the equivalent of  and attempt to match against the pages being linked to. Obviously, this would not work if the link was to the producer's main page but the module was used on a subpage. The new version attempts to be "smart" by trying to strip the qualifier and subpages to get the actual name. In addition, it tries to match the displayed link text rather than the page the link points to.

Even assuming the previous approach of the search logic was correct, the implementation had some bugs. One such bug occurred when the link text is explicitly specified (i.e. it wasn't simply the name of the target page). I probably could have just fixed the bugs but I decided to implement my search approach as I think it provides a little more flexibility and is certainly much shorter in terms of lines of code and number of string manipulations.