We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15309
    • 30 Posts
    I am trying to get a list of document that has a template variable, but getting 0 records what evevr i do ..
    please suggest how to debug the query that is being generated through my call ..

    I am calling ditto as below
    [!Ditto? &tagData=`industry` &tags=`8` &debug=`1`!]

    the document template variables multi Select List item "Jewellery, 1 "

    thanks

      • 32830
      • 21 Posts
      I’m not sure but I think you need to specify a parents directory. (i.e. parents=`22` <-- or whatever directory number you’re pulling from.)
        • 4310
        • 2,310 Posts
        Not sure you need all this but here’s an example from a live site:
        [!Ditto? &startID=`29` &display=`all` &tpl=`ditto_summary` &sortBy=`pagetitle`  &sortDir=`DESC` &commentsChunk=`` &depth=`3` &showInMenuOnly=`1`&tagDelimiter=`,` &tagData=`tvsearchOptions` &tagMode=`onlyTags` &tags=`villa,pool` &noResults=`No Properties Found`!]

        The &tagData parameter should refer to your TV, the &tags should represent one or more of the values from thet TV.
          • 15309
          • 30 Posts
          Quote from: xefned at May 14, 2008, 09:55 AM

          I’m not sure but I think you need to specify a parents directory. (i.e. parents=`22` <-- or whatever directory number you’re pulling from.)

          Thanks adding &parents did solved the problem.. but again i have new two issues ...

          1. when i use &tags=`[*id*]` , it don’t work . but when i replace it with the id of the document it works. I need to dynamically get the id.

          2. When i do enable Debug i.e &debug=`1` , then pages shows the below error
          Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 940412 bytes) in D:\Program Files\AppServ\www\cms\modx-0961p2\assets\snippets\ditto\debug\modxDebugConsole.class.php on line 26



          please suggest some solution..

            • 18397
            • 3,250 Posts
            What version of Ditto are you using?
              • 15309
              • 30 Posts
              I am using Ditto 2.1
                • 15309
                • 30 Posts
                i am using a multi select list box. for the values of TV ...

                how to get the the records with one or multiple combinations..

                Ex.- One DocumentConttent pages belongs to 3 different categories. i used a categopries TV as multiselect.
                now when i try to load all document of a single category i am unable to get all regords..
                I only get records that have only that category. not more than one category.
                For an explanation, i have three categories like RAT,CAT, DOG, now i have a document having details of their living habits, etc..

                1. i have a document that only has details for CAT AND DOG
                2. i have a document with details of CAT AND RAT.
                3. i have a document with details of just CAT.

                when i try to display the list of doc. with CAT , it only shows the "3" document,
                i need all therr to display how can i do this.

                please help

                thanks
                kamal
                  • 27330
                  • 884 Posts
                    • 15309
                    • 30 Posts
                    Quote from: sinbad at Jul 06, 2008, 07:55 AM

                    are you familiar with this one yet?
                    http://wiki.modxcms.com/index.php/Category_Tagging_with_Ditto


                    thanks for the link, it worked for the shown example.

                    but not in my case, I am using a Multi-Select Listbox as Template variable with the fields and Values from a select query... like [glow=red,2,300]@Select key,value from .....[/glow] , and the values are getting saved in the modx_site_tmplvar_contentvalues table as 8||125||126 (these are the id values of my categories).

                    i am still with the same records i.e. the one those are single data they are working fine, but those with multiple options are not working.
                    i am attaching a screenshot of my TV screen
                      • 36592
                      • 970 Posts
                      Are you using &tagDelimiter parameter in your Ditto snippet call ?