We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10449
    • 956 Posts
    Is it possible to let WF return only documents that have a certain TV-value?

    I’ve got a main tree-structure in the manager that is ordered by time periods. Each folder has one time-period, and each of these can contain one or more folders + documents with TV pageTypeDistinction of either "Artist", "Style" or (empty).

    I’ve tried to build a snippet that just returns a comma-separated list of all docs with TV-value "Artist". Then feed this doc-list to WF with &includeDocs. This didn’t work at all, WF doesn’t report an error, but it also simply doesn’t return anything. As in: Nothing whatsoever.

    Then I tried Ditto and its &documents parameter. Of course, the hierarchy goes down the drain with Ditto. A filter is also not quite what I can use here, since a Ditto filter excludes docs, whereas I need the exact opposite.

    Does anyone have an idea? I’d prefer to use Wayfinder. I thought about PHx, but it doesn’t work with WF...
      • 10449
      • 956 Posts
      Well, I solved it now with a Ditto filter anyway. Thank God I only have 2 possible TV values, otherwise it would be a pain in the neck to add all those filters with |...|...| - it gets messy to read pretty fast.

      If someone knows a trick using WF, I would still be happy to hear about it.
        • 5004
        • 62 Posts
        Hi I have a similar problem, do you find a solution with WF, or you still using Ditto.
        Thanks
          • 10449
          • 956 Posts
          still using Ditto...
            • 7231
            • 4,205 Posts
            You could theoretically do this with a logic snippet within the WF chunks to check each returned option and output the info if true. However unless you are working in a limited number of levels it may add quite a bit of overhead overhead for a menu (but then again maybe not). Ditto would be my choice for this task, or a custom menu builder.

            It is often overlooked that you can use snippets in the WF chunks. You can then use the document id as the parameter to feed into your logic snippet to see if x document fits the criteria and then return the output if true or return nothing if not. shocked
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]