We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21778
    • 223 Posts
    Hey laugh

    Say i have a folder with 10 resources.
    I want to make a TV with the options: "new" / "old".

    On a page i want ditto to display all the resources which are labeled "new" only.

    Is this possible? Any suggestion how i can make ditto do this? huh

    Thanks!

      • 36592
      • 970 Posts
        • 21778
        • 223 Posts
        Quote from: tkfm at Nov 07, 2009, 06:16 PM

        Try &filter parameter.
        http://ditto.modxcms.com/files/snippet-ditto-php.html#filter

        Thanks, this seems like something that might work.

        If anyone have time to write me a quick guide on how to achieve my purpose with filter option, i would be glad=)
          • 4172
          • 5,888 Posts
          &filter=`yourtvname,new,1`
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 21778
            • 223 Posts
            Quote from: norlin at Nov 08, 2009, 06:13 AM

            Quote from: tkfm at Nov 07, 2009, 06:16 PM

            Try &filter parameter.
            http://ditto.modxcms.com/files/snippet-ditto-php.html#filter

            Thanks, this seems like something that might work.

            If anyone have time to write me a quick guide on how to achieve my purpose with filter option, i would be glad=)

            Nice, this works beautifully. Thanks!!

            Now i just have to make it work with YAMS somehow wink

              • 19889
              • 616 Posts
              I’d like to populate 2 specific documents to the e.g. the front page - this is what I came up with:
              [!Ditto?&depth=`0`&parents=`154`&filter=`id,155,1|id,156,1`!]


              if works if I put only one filter - adding the 2nd one returns No documents found! - could anybody please tell me what I’m missing?

              Thanks
                • 4172
                • 5,888 Posts
                why not
                [!Ditto? &documents=`155,156`!]
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 19889
                  • 616 Posts
                  because this is just toooooo simple - just kidding - I really feel kind of stupid right now - thanks for replying anyway - please allow me another question - Is there a way to e.g. have those two ids in a chunk for instance so my client could just edit those ids there or what would be the best way to do this - I don’t want him to mess around with the ditto call itself.
                    • 4172
                    • 5,888 Posts
                    you can also have a TV with commaseperated list

                    [!Ditto? &documents=`[*documentsTV*]`!]

                    this can be a checkbox-tv with delimeted output

                    optionvalues for this TV: 155||156||157||158

                    or perhaps better @SELECT pagetitle, id FROM modx_site_content WHERE parent=’XX’
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 19889
                      • 616 Posts
                      I thought of using a TV but I’m still not sure how I could implement it so it would be a little user friendly - the problem with TVs is that you can only attach them to a specific template - so I would need to create a new template just for that - it would be nice if I could have shown those TVs only on a specific page without having to create a new template.