We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19688
    • 21 Posts
    Question 1:
    What is Reflect realy does... And please dont tell me it creates a doc archive. So .... what does Reflect really do?
    Question 2:
    What is the input data that Reflect should procces?
    Question 3:
    What is ditto have to do with Reflect?

    These questions are posted here, because there isn’t a clear documentation for these snippets, and how they should be used.
      • 16183
      • 1,390 Posts
      As I have mentioned here http://modxcms.com/forums/index.php/topic,14003.msg177856.html#msg177856 this kind of attitude won’t help much in getting the answers you require....

      /k
        • 19688
        • 21 Posts
        The only thing I need is to understand. I could take this snippets and read the hole source, and who knows mabe in a month or 2 I could understand what is going on there... but I don’t think this is an efficient way to learn new things. I think you would agrea with me on this... That is why we(the average users) need a clear view of what really happens.

        This being said, can you tell me, us, if we will have an organised tutorial/doc package for this 2 snippets in the near future?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          http://ditto.modxcms.com/tutorials/wordpress-style-archives.html

          Really, Reflect does create an archive of documents.
          ar·chive (är′kīv′)

          noun

          1.
          1. a place where public records, documents, etc. are kept
          2. a place where material having documentary interest, as private papers, institutional records, memorabilia, or photographs, is kept
          2. the records, material, etc. kept in either of such places

          Etymology: Fr archif < LL archivum < Gr archeion, town hall < archē, the beginning, government

          transitive verb -·chived′, -·chiv′·ing

          to place or keep (records, papers, etc.) in or as in archives
          Ditto lists your news/blog/whatever documents, usually up to a certain limit; for example the 10 latest documents, or all documents from this month. Reflect is designed to provide organized access to the documents that are no longer being displayed by Ditto. Both Ditto and Reflect are far too flexible to be able to concisely state how to use them. It depends on what you have and what you want to do with it.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 7231
            • 4,205 Posts
            This being said, can you tell me, us, if we will have an organised tutorial/doc package for this 2 snippets in the near future?
            As this is a volunteer effort this is really up to you or anyone else who wishes to put in the time to do the documentation (although I feel that Reflect has good docs). Since Reflect is based on Ditto an understanding of how Ditto works may help.

            1) Reflect "Generates date based archives using Ditto"
            2) a Ditto call
            3) Ditto is the engine or brain for reflect


              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 19688
              • 21 Posts
              ""Ditto lists your news/blog/whatever documents, usually up to a certain limit; for example the 10 latest documents, or all documents from this month. Reflect is designed to provide organized access to the documents that are no longer being displayed by Ditto. Both Ditto and Reflect are far too flexible to be able to concisely state how to use them. It depends on what you have and what you want to do with it.""

              THen why do we need reflect for? It is not like it creates "folders" for each month/year. We could use ditto and add a filter clause...
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Well, there you go... MODx = MODular, Extensible. There are many ways to do just about everything. Most people seem to find Reflect a good system for organizing and displaying their archives.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 19688
                  • 21 Posts
                  ok, so we have reflect for creating archives...

                  &dittoSnippetParameters=`parents:2`&id=`wp`

                  from what I see here, I belive that reflect will actually make a call to the Ditto snippet?
                    • 7231
                    • 4,205 Posts
                    That’s correct. In your example it is like using ditto with parents=`2`. The advantage to using Reflect is that it can group items by date, where in Ditto you would need to repeat the filter for each month rather than do it all in one call (Ditto does not have a "group by" clause).
                      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                      Something is happening here, but you don&#39;t know what it is.
                      Do you, Mr. Jones? - [bob dylan]
                      • 19688
                      • 21 Posts
                      Quote from: sottwell at Sep 30, 2008, 07:13 AM


                      Ditto lists your news/blog/whatever documents, usually up to a certain limit; for example the 10 latest documents, or all documents from this month. Reflect is designed to provide organized access to the documents that are no longer being displayed by Ditto. Both Ditto and Reflect are far too flexible to be able to concisely state how to use them. It depends on what you have and what you want to do with it.


                      Acordin to this I may have a diito call that would list this month posts... [[Ditto? &parents=`news_folder_id` &summarize=`all` &filter=`filter documents posted this month`]]

                      And on the same page I need a reflect call, that would create an archive.... [[Reflect? &some_refflect_parameters]] or I need to include the ditto &filter inside the Reflect call? ... [[Reflect? &some_refflect_parameters dittoSnippetParameters=`parents:parents_id|filter:createdon,ditto_filter,filter_mode`]] and remove the previous ditto call???

                      And another page with a ditto call to display whatever this archive is showing??? [[Ditto &some_parameters_to_display_pages_provided_by_reflect]]

                      Am I right?