I have a tpl that is included from other tpls (actually almost 70). The problem is that this template must do something if it's been included inside a given DOM element (as first child).
Here's is an example:
<div id="container">
{include file="mytpl.tpl"
param1="aValue1"
param2="aValue2"
}
</div>
Using Javascript is out of the question, because this affects the backend.
Also, I know I can pass an additional argument to my tpl. The problem is that I'd have to add that instruction to all the almost 70 files that call that tpl.
So, what I'd like to be able to do is to ask if its parent is "container" and it is its first child.
One file solution:
{include file="mytpl.tpl"
param1="aValue1"
param2="aValue2"
paramX="X"
}
and then, in the tpl..
{if $paramX eq 'X'}...{/if}