We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 560
    • 0 Posts
    I’m trying to print out fax numbers, phone numbers, urls, etc.. If they all have data, then the display would look something like this:

    Phone: 555-555-5555, Fax: 555-555-1234, www.website.com

    But let’s say they only put in a phone number and website. Then the output should look like this:

    Phone: 555-555-5555, www.website.com

    I can add the comma to the end using the cat string output modifier (http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+%28Output+Modifiers%29)

    It looks like this, [[*expo_company_phone_number:cat=`,`]]. How do I add text before the word? Is there a modifier for this or am I going to need to do some sort of script to check if the tv is empty or not?
      • 560
      • 0 Posts
      Turns out the cat modifier won’t work, it still displays the cat text even when the TV is empty. Does anyone have another solution that works with the CMS and preferably doesn’t require coding?
        • 27705
        • 38 Posts
        How is the information gathered? You could always use a placeholder for empty fields.
          • 560
          • 0 Posts
          The information is being gathered through the manager. The author of the page will input all the values when they create the page.

          These particular TVs are text inputs with text outputs. And then I was attempting to use the cat modifier to add commas afterwards. But if the phone tv is empty for example, I don’t want the "Phone:" text of the comma to show up.
            • 9207 ☆ A M B ☆
            • 2,475 Posts
            I think the easiest way to do this would be to a custom output modifier (so yes, that requires some coding).