Page MenuHomePhabricator

Find the used template from the template itself
Open, LowPublic


I believe that at least twice I have I had problems with templates in situations where knowing which templates were being transcluded into other templates would have been good to know. Strainu described a problem here which sounds to me like it's identical:

"Say we have an article which includes {{Infobox A}}, which redirects
to {{Infobox B}}, which in turn transcludes {{Infobox}}, which is
implemented using [[Module:Infobox]]. Is there a way to know from the
module (or the {{Infobox}} template) which infobox was actually used
in the article?"

I am creating this task with the hope that a feature which addresses this problem will be implemented.

Event Timeline

Pine created this task.Mar 11 2018, 5:29 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 11 2018, 5:29 AM

Sort of similar to T26284

Very similar actually. :) {{{0}}} is a generic solution to my problem, making getParent() work an unlimited number of levels is a Lua-only solution. No idea which one is easier to implement.

Despite a token, I do not believe it will ever happen, because of complexity problems.

Aklapper triaged this task as Low priority.Mar 11 2018, 12:15 PM