We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21122
    • 153 Posts
    Hi there,

    I’ve got this lovely little Phx snippet that checks if a TV is empty or not, and prints out some code depending on the result.

    I have it working fine in a chunk, but for some reason I can’t get it to work in a template.

    The Phx snippet is called phx:isnotempty and looks like:

    <?php
    $condition[] = intval(trim($output) != '');
    ?>


    I’m trying to use it in a template like:

    [*siteImageLarge1:isnotempty:then=`<img src="[*siteImageLarge1*]" width="400" />`*] 


    I’ve tried both ’*’ and ’+’ but neither seem to work.

    Any help would be very much appreciated.

    Thanks
      • 33976 ☆ A M B ☆
      • 571 Posts
      Maybe something like that would avoid the use of a snippet and will do the trick.

      I hope this helps.