Re: [MediaWiki-l] Can an extension detect transclusion?

2012-07-25 Thread Trevor Parscal
TemplateInfo[1] did this. The way TemplateInfo works is that there's a parser hook that can be used in the template namespace. When you transclude the template, the parser hook returns an empty string. When you render the template page the parser hook renders a table describing the data inside the

[MediaWiki-l] Can an extension detect transclusion?

2012-07-25 Thread Daniel Barrett
Is it possible for a MediaWiki extension to detect that it was transcluded? For example, if you have this: 1. Article A transcludes {{T}} 2. Template:T contains a tag extension 3. You hit article A. Can MyExtension.php somehow detect that it was transcluded from Template:T and w