I am working on a site that uses a module that uses 2 .tpl files, eg: list.tpl
and product.tpl
. A 3rd .tpl file, product-image.tpl
, is used within each of these and is called with a render function, eg:
On list.tpl:
<div id="list-images">
<?php print render($element['productImage']);?>
</div>
and on product.tpl:
<div id="product-images">
<?php print render($element['productImage']);?>
</div>
I want to modify the output of product-image.tpl
when it displays on product.tpl
. For example, something along the lines of:
"If I am being used on product.tpl do this {..."
Would anyone know of a way to have product-image.tpl
know what .tpl it is being used on?