We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25018
    • 9 Posts
    I’m trying to output a single result based on a filter but the result is random.
    Here is the ditto call.

    [!Ditto?startID=`3` &display=`1` &randomize=`1`&total=`1`&filter=`featured_case, no, 8`&tpl=`featured_case`&debug=`1`!]


    The randomize works, the display 1 result works. The filter seems to find all results as as a possible choice, not from a filtered set.
    The TV is a checkbox with an input option value of ’yes’ and default value of ’no’ (no quotes)

    Any ideas why this isn’t working?
    Thanks
    Rich
      • 20413
      • 2,877 Posts
      Try
      [!Ditto?parents=`3` &display=`1` &randomize=`1` &filter=`featured_case,no,8` &tpl=`featured_case`!]


      Or change your tv input options:
      yes==1||no==2


      Re-save resources and try:
      [!Ditto?parents=`3` &display=`1` &randomize=`1` &filter=`featured_case,2,2` &tpl=`featured_case`!]


      And make sure you have multiple resources with the TV checked no. Else try remove the under-score from your TV name.
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 25018
        • 9 Posts
        Meant to reply to you yesterday, but you suggestions worked perfectly.
        Thanks Mrhaw!

        Rich