We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14906
    • 9 Posts
    Ok, I’m a newbie to this, and just starting to get some of the basics of MODx, Ditto, and PHP.

    I have a bunch of template variables that I would like to output into a comma separated list, like this:

    Additional Features:
    [*TV1*], [*TV2*], .... etc.

    But, if one or more of the variables isn’t filled in by the user, I don’t want the extra ", " between the tv’s.

    Does that make sense? How would I go about doing this?
      • 4172
      • 5,888 Posts
      the TV-Placeholder-Tag in Ditto is [+.......+], not [*.............*]

      to hide the comma you can try to use phx like that in your Ditto-chunk:

      [+TV1:isnot=``:then=`[+TV1+],`+]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!