On Thu, Mar 1, 2018 at 2:52 PM, Strainu <strainu10(a)gmail.com> wrote:
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?
Not unless you pass it along as a parameter.
mw.getCurrentFrame().getParent() only goes one level up (so you can tell
Module:Infobox was called from {{Infobox}} but not beyond that).