So let's say I have a template template_base and a template_module1 and template_nice_input_box.
template_base
template_module1
template_nice_input_box
As you can see, they all depend on the template_nice_input_box in the end.
So the variable in template_module1 works. However some other things go wrong.
Firstly, the JS is not embedded. It only seems to be embedded if it is actually put into the first template and it cannot be included in a "sub-template".
Strangely, I could only reproduce this for admin templates.
Secondly the variable $inputId, which is passed to template_nice_input_box is gone. Actually it cannot be used in template_nice_input_box at all, although passing of variables works when done in the first template.
This is of course a made-up untested example, but I discovered the issues when trying to do these things.
XenForo v1.5.7 (I checked the changelog of newer versions and I did not saw that this issue would be fixed)
template_base
Code:
<xen:include template="threemagw_auto_trigger" var1="supi" />
template_module1
Code:
Something with {var1}.
<xen:require js="js/MyAddon/ThisIsAnIsland.js" /> <!-- This is not embedded! -->
<xen:include template="template_nice_input_box" inputId="myCoolInput" />
template_nice_input_box
Code:
This thing required some JS
<input id="{$inputId}" …></input> <!-- This does not work! -->
As you can see, they all depend on the template_nice_input_box in the end.
So the variable in template_module1 works. However some other things go wrong.
Firstly, the JS is not embedded. It only seems to be embedded if it is actually put into the first template and it cannot be included in a "sub-template".
Strangely, I could only reproduce this for admin templates.
Secondly the variable $inputId, which is passed to template_nice_input_box is gone. Actually it cannot be used in template_nice_input_box at all, although passing of variables works when done in the first template.
This is of course a made-up untested example, but I discovered the issues when trying to do these things.
XenForo v1.5.7 (I checked the changelog of newer versions and I did not saw that this issue would be fixed)