We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18830
    • 161 Posts
    Please have a look at this setup:

    There is a dropdown TV with often used strings. Maybe it is called "big" with New York||Tokyo||Berlin.

    And then I have a second empty text-TV - "small". Here the user can put in alternative names. Maybe "Dessau", my small home town. grin

    Now I’m pondering about Ditto: Is there any way to display the content of [+tvsmall+] instead of [+tvbig+] if big is empty and small contains a string? I would like to keep the "big"-TV clean.

    Any suggestion is welcome. Thank you all.




      • 18830
      • 161 Posts
      From Ditto 1.1 beta 1 changelog: "Tags now support multiple tagData sources in a comma delimited fashion and the [+tags+] placeholder for a nice tag list".

      Sounds good. I will give it a try.
        • 17883
        • 1,039 Posts
        Why not putting [+big+][+small] together in the ditto-template? Therefore just change the first Tv to

        no city selected=={{nothing}}||New York||Tokyo||Berlin

        and create an empty chunk called "nothing"

        Then the user either selects a city from "big" or has to type in a city for "small", which are displayed identically (as long there is only one TV filled out).

        Dessau in germany? Gruß aus Karlsruhe wink
        Marc
          • 18830
          • 161 Posts
          Well, I’m so stupid. >:( Because I had put the two TV placeholders into the chunk - but in different paragraphs. And I was so busy searching a solution that I didn’t realized, that I had found the solution already. grin Thank you for the tip, MadeMyDay. wink

          Anyway: I tested it with Ditto 1.1 beta 2 and this works too.

          Gruß aus Dessau/Germany

            • 18830
            • 161 Posts
            Update: With help of the PHx-Plugin you can suppress the output of the "big"-TV set by mistake when there is an entry at "small"-TV.

            [+tvsmall:isnot=``:then=`[+tvsmall+]`:else=`[+tvbig+]`+]