We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16534
    • 47 Posts
    For days now I’ve been reading the Wiki and docs to try and get my hear around the snippers workings, but I can’t seem to work it out.

    I have the following code in an article named "Archives" which uses the code to mimic the look of a wordpress archive:

    [!Reflect?config=`wordpress` &targetID=`2` &getDocuments=`5` &dittoSnippetParameters=`parents:0`&id=`wip`!]

    I read through the instructions, but I’m still having problems.

    The months show up fine. My problem is when you go into a month, it only shows one article (and instead of linking to it, it just goes straight in) and only that article.

    For example:

    Archives

    * May 2007 - links to Article 5
    * June 2007 - links to Article 5
    * July 2007 - links to Article 5
    * October 2005 - links to Article 5


    Anybody know what I’m doing wrong? I just want all articles from that month put in.



      • 16534
      • 47 Posts
      Any help please?
        • 25663 MODX Staff
        • 12,272 Posts
        Moving to the Ditto support thread.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 2912
          • 315 Posts
          I have Reflect working using the same code.

          I put my Reflect code in my Template in the side bar making sure that I had created a document as the Reflect target.

          The reflect target document, in your case, number 2 has the following code in it:

          [+wp_month+] [+wp_day+] [+wp_year+]
          [!Ditto? &id=`wp` &extenders=`dateFilter` &parents=`47,61,52` &commentsChunk=`MovieComments` &tpl=`MovieDittoRecent` &paginate=`0` &display=`all`  &alwaysshow=`1` &sortBy=`menuindex` &depth=`2`!]
          


          Maybe you are missing the target page in your document tree. (I’m sure there is too much info there but it works.)

          What you should get is a list of document for that specific month and then you can click that document to read it..

          Hope that helps.
            BBloke
            • 18397
            • 3,250 Posts
            1. If you are using &id, its value on both Reflect and the landing page must be the same.
            2. &getDocuments is a 0/1 toggle
            3. Are all the documents you want Reflect to show in the site root (that is what parents:0 will do with depth defaulting to 1)
            4. What is the content of Document #2?
              • 16534
              • 47 Posts
              OK thanks for the replies but I’m kinda confused by them, maybe if I say what I want then you could tell me the code I need?

              I want to have a page named Archives in my root, and when clicked will contain each month/year and then when you click them, it takes you to the articles of those months.

              I want ALL articles to be included, in ALL directories.

              Sorry if I wasn’t clear.
                • 16534
                • 47 Posts
                OK i think I’ve got it working now, thanks a lot for the help.

                  • 16534
                  • 47 Posts
                  Sorry to bump this but it’s better than making a new one. How would I order by date? I’ve spent almost 2 months using ModX and I just can’t get my head around it.