We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33167
    • 2 Posts
    I’ve been doing a lot of searching on this, and I can’t seem to get a consistent answer that works for me, so I thought I would throw this out to the community at large.

    I’ve got some documents that are categorized by document type and by product category. Those types and categories are TVs. I want to use those TVs to categorize and filter my documents, but I also want to use to those TV values to display the form drop downs and check-boxes. That way if someone decides to change the filter names or add filters, the whole thing updates nicely.

    You can see the basic template (not yet functioning) here:
    http://76.75.219.56/library

    If I’m to believe what I’ve read so far (running Evo 1.0.3 and Ditto 2.x), I should be able to use something like this to retrieve the all the values for a specific TV:

    [!Ditto? &documents=`[*ironridge_product_sub_category_roof*]` &tpl=`ironridge_prod_sub_cats` !]

    Yet, this doesn’t seem to work. All I get is No Documents found. I’ve tried adding parents, making the TV the parent and seemingly every permutation.

    So now my question is is this a valid way to call TVs using Ditto? It’s being called within a Chunk, which shouldn’t be a problem. And I’ve quadruple checked the spelling and it’s all correct between ditto, tv and chunks.

    Any help for a new guy looking to find his way would truly be appreciated.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      What, exactly, does that TV output all by itself? What does the &documents parameter expect?
        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
        • 33167
        • 2 Posts
        Well, based on some other things I’ve read, specifically here:

        http://modxcms.com/forums/index.php?topic=35890.0

        I created the above syntax. I now realize that’s wrong. That’s using docs tagged with a specific TV and using that as a filter.

        So, let me ask it different. Can I use Ditto to loop through the either the names or the values in a TV and output them to the screen?