We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26799
    • 177 Posts
    I’ve grown pretty familiar with ditto over the last few hours and I hope I’m just tired and inexperienced but I can’t figure out if it’s possible with a non hacked ditto if it would be possible to limit the listings to only those that have a TV value set to a particular value.

    I may not be making sense! so I’ll just post some code.

      [[Ditto? &tpl=`my_tpl` &summarize=`0` &startID=`2` &displayArchive=`1` &sortby=`[*ministry_name*]` &archiveText=`Other Operating Locations`]]
    


    [*ministry_name*] is a :String type object.

    I’m pretty sure the &sortby only deals in numeric values, but one would think that ditto could limit results to matching TVs. let me know if I’m chasing my tail here and if I should start using/developing another script or pursuing a solution.

    I was also wondering if I could achieve this through tags...
      • 11975
      • 2,542 Posts
      Hi,

      be careful to the case of params => &sortBy

      if you wish to match a TV value.
      add &tagData=`tvNamewith_tv_prefix` => if several tv = comma separated list
      &tagDelimiter="," must match your delimited list widget in TV settings
      &tags=`` the values you’re looking for
      If The document in which the call is executed does not have the same template as the searched documents add the param
      &hiddenTVs=`tvnamewithout_tv_prefix`
      The last param is &tagMode by default equal to onlyTags.

      You can also use &filter=`tvNamewith_tv_prefix,searchedValue,filterMode`
      The logic is a bit different from tagMode, ditto will remove from the listing every doc that match the filter criteria.

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 18397
        • 3,250 Posts
        &tags* parameters should only be used with tagging.

        &filter=`tvNamewith_tv_prefix,searchedValue,filterMode` is the correct syntax.
          • 26799
          • 177 Posts
          is there a basic filtering tutorial available? I can’t seem to find much about it in the documentation. And I don’t think I know enough to understand what yall are sayin.

          or you could answer some questions..

          Like where do I put my operator (==), or are they even used?

          what is a "filterMode"?


          &tags* parameters should only be used with tagging.

          That’s what I figured.


          I’m looking this stuff up and if your confident this has been approached before in an easily understandable way, you can consider this solved and I’ll post links to the corresponding forum posts or wiki entries as I find them. thanks for pointing me in the right direction.
            • 26799
            • 177 Posts
            [[Ditto? &tpl=`tpl` &summarize=`0` &startID=`2` &displayArchive=`1` &filter=`tvministry_name,[+ministry_name+],1` &archiveText=`Other Operating Locations`]]
            


            the above call returns:

            No entries found.

            am I supposed to put the tv_prefix in the variable name when creating the TV?
              • 867
              • 241 Posts
              YEP
                • 11975
                • 2,542 Posts
                You don’t have to create the tv with the tv prefix in its name

                Your ditto call is wrong

                [[Ditto? &tpl=`tpl` &summarize=`0` &startID=`2` &displayArchive=`1` &filter=`tvministry_name,[+ministry_name+],1` &archiveText=`Other Operating Locations`]]

                Change [+ministry_name+] => [*ministry_name*]
                  Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                  • 26799
                  • 177 Posts
                  ever seen the movie "Sling Bade" with Billy Bob Thorton?

                  There is a scene in that move that sums up my entire night.

                  this dude brings him a lawn mower that won’t run, the guy says he’s tried everything; spark plugs, carberator, ect.

                  Ol- billy bob comes out and checks the Gas and finds that it has none.

                  I wasn’t calling a valid TV. haven’t been for hours now. Thanks for everyones patience, I’m just an idiot.