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

    I working on a site where I need to show the link to a page only if a custom TV on that page is not empty.

    Here is a sample page: http://temporaryaudio.org/index.php?id=3

    That page is pulling up the information for the children pages as the tracks through a Ditto call. When you click on "watch video" you go to the page for that track which has the video. In some cases there will be no video, so I need to somehow find out if the field for the video is empty and not show the link if it is. Is there a way I can do this and still use my Ditto loop?

    Thanks.
      • 18397
      • 3,250 Posts
      Take a look at PHx. Ditto internally supports it so you don’t even need to install it if you only plan on using it inside of your Ditto calls.
        • 4676
        • 10 Posts
        Thanks. That worked perfectly.

        I added a line in my ditto template chunk that looks like this:

        [+phx:input=`[+tvTrackVideo+]`:gt=`0`:then=`<a href="[~[+id+]~]">Watch Video</a>`+]