We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1122
    • 209 Posts
    By adding just one line of a new code, my glossaryFilter extender behaves as it was suggested by rivendell48. Please see updated first post in this thread.
      • 25132
      • 129 Posts
      Got it all working. Thanks so much for your input!
        • 16702 ☆ A M B ☆
        • 536 Posts
        Fantastic smiley
          palma non sine pulvere
          • 7527
          • 437 Posts
          Can someone help me on this. I have added the following call to my template:

          [[Ditto? &parents=`71` &depth=`2` &display=`all` &extenders=`glossaryFilter` &filterVar=`alias` &filterBy=`^0-9`]]

          where do i put the glossary extender php code? I am a little lost on it, as I have tried creating a snippet as ’glossaryFilter’. But it just tells me that the Glossary extender is missing.

          I am using Evolution
          Thanks
            www.PawsForWildlife.co.uk
            www.Borntobrick.co.uk
            • 7527
            • 437 Posts
            Ok. I have now created a new snippet, added the Glossary extender php. I called this snippet Dittoglos.

            My call is : [[Dittoglos? &parents=`71` &depth=`2` &display=`all` &extenders=`glossaryFilter` &filterVar=`alias` &filterBy=`^0-9`]]

            I get a parser Syntax error, an unexpected string?
              www.PawsForWildlife.co.uk
              www.Borntobrick.co.uk
              • 16278
              • 928 Posts
              Ditto extenders are not independent snippets, but extra code for Ditto itself. The extender’s PHP file has to be placed in the assets/snippets/ditto/extenders folder. That’s where where Ditto expects to find it when you specify &extenders=`glossaryFilter`.
              wink KP
                • 7527
                • 437 Posts
                Thanks kp52 I have now amended. I now have a page with Ditto results of all files in a specific folder. They display when you click the page. I need to change it to blank and add an A-z bar that will filter results by name. The examples on the link at the top of this thread are what I am looking for, but I dont know how to add the Build-Glossary_get php code to my snippet?
                  www.PawsForWildlife.co.uk
                  www.Borntobrick.co.uk
                  • 7527
                  • 437 Posts
                  Ok, I have sorted it now and it works. One last issue to resolve. The title bar shows results correctly, but they are not linked to the relevant page, they are just text. How can I get my results to show the page title and also link to the corresponding page?
                    www.PawsForWildlife.co.uk
                    www.Borntobrick.co.uk
                    • 16278
                    • 928 Posts
                    Back to Ditto basics now - you’ll need to create a "template chunk" containing HTML and placeholders for the data you want to list and link to it with the &tpl parameter.
                    smiley KP
                    http://www.pogwatch.com/ditto/ditto-templates.html
                    http://codingpad.maryspad.com/2009/05/01/building-a-website-with-modx-for-newbies-part-8-more-ditto/
                      • 7527
                      • 437 Posts
                      I have added the following from a Ditto I used elsewhere. I have put it in a chunk named Dittosearch

                      <div class="grid3">
                      <h2><a href="[~[+id+]~]">[+pagetitle+]</a></h2>



                      <p>[+summary+]</p>
                      <p><a href="[~[+id+]~]"><strong>View page...</strong></a></p>

                      </div>

                      I then added tpl=`Dittosearch` to my snippet call, but it doesn’t appear to have changed anything?
                        www.PawsForWildlife.co.uk
                        www.Borntobrick.co.uk