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

    I have a checkbox TV with 4 options in it, all works great apart from the fact it is returning the separating || in the output

    I have it set up as follows:

    Template has a get resources call in it to pull in the resources using a chunk called caselist and contains the following:

    <div class="casestorylist">
    <h3>[[+pagetitle]]</h3>
    <div class="case-left">
    <img src="[[+caseimg]]" alt="[[+pagetitle]]" />
    </div>
    <div class="case-right">
    <p><strong>Location: [[+location]]</strong></p>
    <p> </p>
    <p class="uppercase">www.[[+pagetitle]]</p>
    <p class="intro">[[+introtext]]</p>
    <p class="uppercase">Bringing the story to life</p>
    <ul>
    
    [[+Life]]
    </ul>
    </div>
    </div>


    Life is the name of the TV for the checkboxs set as a checkbox with the following input options:

    Web Design==[[$Webdesign]]||Ecommerce development==[[$Ecommercedev]]||Conversion==[[$Conversion]]||Mobile Design==[[$Mobiledesign]]


    Each of the above have a chunk with a LI in them, As I said the correct chunks are output apart from the fact I have || after each LI as per screen shot.

    This is driving me mad as I have it set up on another site and it's working fine ( same server etc ), only differance is that the one above that is acting strange is on revo 2.2.4 pl on a Traditional install

    Any help would be appreciated.

    Thanks



      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Is the output type "default"?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 22840
        • 1,572 Posts
        Hi Susan,

        Yes default on the output type, it's got me stumped shocked/
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ah. Mine is just being ouptut directly.

          How about a :strip output modifier on that placeholder?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 22840
            • 1,572 Posts
            Hi Susan,

            How would I do that ?, not really a php person.

            Thanks
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Looks like stripString is what you need... http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+%28Output+Modifiers%29#InputandOutputFilters%28OutputModifiers%29-Stringoutputmodifiers

              [[+Life:stripString=`||`]] 
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                These output modifiers are especially intended for non-programmers. It's worth looking them over from time to time so you know how you can use them to manipulate your TVs and placeholders.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 22840
                  • 1,572 Posts
                  Thanks Susan,

                  As always spot on, just can't understand why it was doing it on this install and not the others.

                  I do use output modifiers but mainly for if empty or to change the output dependent on a document id, time for me to read up some more I think.

                  Thanks again smiley