Hi,
I’m trying to embed a template into a page only if a certain element is present.
This is what I am using:
{if image-2}{embed="globals/_js-slide"}{/if}
in the page ‘image-2’ isn’t inserted but it is rendering the template ‘_js-slide’ anyway.
this works fine though for actually rendering ‘image-2’ and surrounding elements that I have told to only appear if ‘image-2’ does (divs etc, which arn’t showing in this page because ‘image-2’ isn’t).
Is there a different way of only conditionally adding templates?
Thanks.