We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23050
    • 1,842 Posts
    Hi there,

    I use Ditto in a specific way : I have 2 documents (let’s call them product and manufacturer). Each document are in a different folder : 1) is for all my products and 2) all my manufacturers.

    Now, I have a template (not a chunck) where I build my page : presentation of the product + I would like to call some elements of the manufacturer.

    I use Ditto to call this elements by including them in a chunck... That would be perfect except that I would like to call a specific document and not a folder like $startID was designed for. For example, I build my page with the product A (the doc ID is 4) and add the manufacturer B (which doc ID is 5). How can I call document 5 (and not parent folder ?)

    I read the documentation but still don’t find a tag to do that. May I miss it ?

    Thx for this smiley
      • 15987
      • 786 Posts
      If all you want to display is the manufacturer page inside the product page you do not need a ditto call. You can just use the @document binding to pull in the info. So you could setup a tv and then use the binding to set which manufacturer to pull in for each product. Here is alink to the documentation on the @document binding:

      http://www.modxcms.com/document-binding.html
        • 23050
        • 1,842 Posts
        In fact, in a manufacturer document, there are many tv I want to put in the product page ^^

        Davidm showed me how to use Ditto with hiddentv so that I can call all the manufacturers elements I want in a chunck smiley

        Thx for help smiley
          • 18397
          • 3,250 Posts
          You no longer need hiddentvs. If you properly prefix your tvs with tv in your tpl chunk Ditto will automatically detect them.
            • 15987
            • 786 Posts
            You could always use the filtering to get the page you want.
              • 18397
              • 3,250 Posts
              Well, startID technically does not need to be a folder, it can be a single document and still work...
                • 23050
                • 1,842 Posts
                Quote from: Mark at Jun 15, 2006, 01:17 AM

                You no longer need hiddentvs. If you properly prefix your tvs with tv in your tpl chunk Ditto will automatically detect them.
                You could always use the filtering to get the page you want.
                AH ok... Was wondering why specify tv in $hiddentv and in $filter... It’s the same so ? And I only can use $filter ?

                Well, startID technically does not need to be a folder, it can be a single document and still work...
                I tried with a document ID but it outputs : "no entries found"
                  • 6726
                  • 7,075 Posts
                  Quote from: Mark at Jun 15, 2006, 01:17 AM
                  You no longer need hiddentvs. If you properly prefix your tvs with tv in your tpl chunk Ditto will automatically detect them.


                  Here is something that I totally skipped when upgrading from NewsListing, nice to know smiley

                  Quote from: Mark at Jun 15, 2006, 01:50 AM

                  Well, startID technically does not need to be a folder, it can be a single document and still work...

                  Another very nice thing, there is even more to Ditto than I first thought !

                  Quote from: Perrine at Jun 15, 2006, 06:46 AM
                  I tried with a document ID but it outputs : "no entries found"

                  Try turning on debug mode, it has helped me many times understand what had gone wrong
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id