Board Thread:Support Requests - Getting Technical/@comment-9605025-20160507213658/@comment-1757994-20160509215237

All transclusions and magic words are evaluated in the context of the top-level page you are displaying. So it's not possible to have them evaluated at some intermediate level.

You could probably achieve the same effect (with much pain) by passing a named value into every transclusion. Then every place you have a magic word, look for the named value. If the named value is present, use the named value. If the named value isn't present, use the magic word.


 * Page11 calls
 * Page1 calls
 * Template1 evaluates

So on Page1, Template1 uses and displays Page1 on Page1.

On Page11, Template1 displays Page1 on Page11.

That seems like a lot of pain to me. It could maybe made a little more transparent if each page had some kind of logic like
 * , where ThisPage is the hard-coded name of the page

then each page would be able to detect if it had been transcluded or not. Either way, it still seems like a lot of pain.