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

    How to configure ditto to display all subpages which have a specified template name?

    Thanks
    Greg
      • 21978
      • 59 Posts
      Another way of defining my question - how to use &filter parameter?
      Greg
        • 18397
        • 3,250 Posts
        &filter=`template,nameOfTemplate,2`
          • 21978
          • 59 Posts
          Thanks

          Is there somewhere a documentation on this subject? I’d like to know more about this - e.g. why there is "2" at the end, what other values can I use, ... ?

          Greets
          Greg
            • 18397
            • 3,250 Posts
            Its scattered across the forums at the moment. More complete documentation is in the works, but not until after Ditto 1.1 Final is out.
              • 21978
              • 59 Posts
              Thanks,

              Unfortunately the filter doesn’t work. My ditto string:
              [[Ditto? &tagData=`tvtvautor,tvtvopis,tvtvtytul,tvtvokladka,tvtvpoziom` &startID=`7` &descendentDepth=`2` &summarize=100 &trunc=0 &tpl=`Ditto Chunk Ksiazki` &filter=`template,SzablonKsiazki,2`]]

              SzablonKsiazki is the name of the template.

              Greg
                • 18397
                • 3,250 Posts
                That should work in Ditto 1.1 Beta 2 but not in any previous releases. Please append &debug=`1` and paste the resuts in a QUOTE or CODE block here.
                  • 21978
                  • 59 Posts
                  Hello,
                  Thanks to debug mode I’ve managed to come to a solution. I’ve used template ID instead of template name and now it works fine.
                  Look the code below.

                  [[Ditto? &tagData=`tvtvautor,tvtvopis,tvtvtytul,tvtvokladka,tvtvpoziom` &startID=`7` &descendentDepth=`2` &summarize=100 &trunc=0 &tpl=`Ditto Chunk Ksiazki` &filter=`template,7,1` &debug=`1`]]


                  Thanks
                  Greg
                    • 18397
                    • 3,250 Posts
                    @Greg: descendentDepth is now just depth.

                    You are entirely correct. I forgot that the "template" field in the db is an id # and not the name.