It should be possible to differeciente these three cases, assuming you have a Template:A that redirects to a Template:B:
- A page that only transcludes Template:A using the wikitext {{A}}
- A page that transcludes both Template:A and Template:B separately using the wikitext {{A}}{{B}}
- A page that transcludes the content of Template:A (for example using isRedirect in Lua) and transcludes Template:B using the wikitext {{B}}
All three of these cases would add the following entires to the templatelinks table:
tl_from | tl_namespace | tl_title | tl_from_namespace |
---|---|---|---|
? | 10 | A | 0 |
? | 10 | B | 0 |