We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 560
    • 0 Posts
    We have a page with a list of exhibitors and each one has an company name, address, phone number, abstract, etc. Currently the page is static but I’d like to make it dynamic so I’m creating template variables for the various fields. We also have several exhibitor levels and a company can have multiple levels.

    I would like to have each level appear as a check box when editing the page so the page authors can simply check the box fore any and all levels that apply to that exhibitor. If a box is checked, then the output needs to be an image, the logo of the respective level.

    Currently I am trying this

    Expert Alliance Partner==<img class="expo_partner_level" alt="" src="TSW/images/expo/partner_levels/SS-Platinum-Partner.jpg">||Field Services Bronze==<img class="expo_partner_level" alt="" src="TSW/images/expo/partner_levels/FS-Bronze-Partner.jpg">

    This is almost working, the images show up if the box is checked and don’t show if the box is checked. The issue is that I’m seeing the || on the page. I’ve set the output type as delimited and set the delimiter as ||.

    I have two questions: 1) How do I get the delimiter to go away and 2) Is there a better way to do this, preferably without a lot of PHP.


    Side Note: Why does the MODX documentation ignore about half of the output types? What is the difference between text and a string for example? http://rtfm.modx.com/display/revolution20/Template+Variable+Output+Types
      • 3749
      • 24,544 Posts
      Try setting the output type as "default".

      Are you using this in the front end, or in the Manager?
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 560
        • 0 Posts
        Setting the output type as default worked. The check box is checked in the manager. The image will show up in the front end, on the actual page of the site.