We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10487 MODX Staff
    • 1,535 Posts
    Oh crap, just realised what I’ve done wrong - there’s a typo on the placeholder value in my first post (which I will now correct rolleyes)

    The results placeholder should be:
    [+atozresults+]


    There was a rogue ’t’ in the middle of the one that doesn’t work. Can you try that and let me know if that works okay (btw, you’re okay to put the placeholders straight onto the page)

    As for the first problem, that’s because I missed a validation check in the snippet and it doesn’t like folders/documents that have no children - I was hoping to have a second release out by now but time seems to have escaped me recently. I’ll get a quick fix for that uploaded though, thanks for reporting it smiley
      Garry Nutting
      Senior Developer
      MODX, LLC

      Email: [email protected]
      Twitter: @garryn
      Web: modx.com
      • 8461
      • 205 Posts
      Thanks garry,

      Thata working fine now

      Much appriciated

        • 22221
        • 283 Posts
        I’ve the following error when I click on any letter :
        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY pagetitle ASC' at line 1 »
              SQL: SELECT * FROM `db156353443`.modx_site_content WHERE published=1 AND deleted=0 AND hidemenu=0 AND privateweb=0 AND (id=78 ORDER BY pagetitle ASC ;
              [Copy SQL to ClipBoard]
         
        Parser timing
          MySQL: 	0,0229 s s	(3 Requests)
          PHP: 	0,0901 s s	 
          Total: 	0,1130 s s

        I call the snippet with the following syntax
        [!atoz? &startid=77 !]
        [+atozletters+] 
        [+atozresults+]

        Any Idea to help me to solve ?

        Idea to add new fonstionality to you snippet, a parameter to select a letter to display for the first call of the snippet
          • 10487 MODX Staff
          • 1,535 Posts
          Hmm, seems to be a rogue left-bracket in the SQL statement that I think could be causing the problem.

          Been a while since I last looked at this in any great detail - let me just have a refresher and I’ll get back to you shortly wink

          UPDATE: Okay, found the issue - just fixing now, I’ll post an update once I’ve gave it a quick test run. smiley

          Thanks, Garry

            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 10487 MODX Staff
            • 1,535 Posts
            Rightio, I’ve just posted an update (v0.4) to the snippet in the first post. And there are two bugfixes for the price of one grin

            The fixes both deal with the startID parameter that can be used and are:


            • Incorrect array parsing of document IDs when there is only one child for the chosen start ID
            • An incorrect conditional statement was causing issues with getting the correct results when using the startID.

            Thanks OncleBen31 for raising the issue! smiley And any mods to this are extremely welcome, I want to develop this further at some point but any help along the way is greatly appreciated wink

            Cheers, Garry
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 22221
              • 283 Posts
              OK thanks for the quick answer and the patch. grin
              I’ve test the new version. No more error message but the result part is always empty huh

              I used the call
              [!atoz? &startid=`77` !]
              [+atozletters+] 
              [+atozresults+]

              Where 77 is a folder with 2 documents

              I’ve test with
              [!atoz? &intro=`Please choose a letter from the above selection` &norecords=`Sorry, no pages have been found for this page` &summary=`longtitle` &startid=`2` &hidemenu=false!]

              And no result and no message like "Please choose a letter from the above selection"

              Where am I wrong ? tongue
                • 10487 MODX Staff
                • 1,535 Posts
                Okay, I tested this when I got home from work and found a few issues that weren’t showing up on my live website for some reason.

                OncleBen31, can you give it a blast and let me know if it displays the items correctly?

                UPDATE: The first post has been updated with the new version smiley

                Thanks, Garry
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 22221
                  • 283 Posts
                  It works perfectly grin

                  Thanks
                    • 33114
                    • 518 Posts
                    I would dream about a glossary-like layout in ’ALL’ section smiley
                      http://modx.ru - российская поддержка MODx
                      http://newscup.ru - экспериментальный проект
                      http://yentsun.com - персональный сайт
                      • 10487 MODX Staff
                      • 1,535 Posts
                      Great idea, yentsun smiley I’ve added it to the ToDo list for this snippet.

                      Thanks, Garry
                        Garry Nutting
                        Senior Developer
                        MODX, LLC

                        Email: [email protected]
                        Twitter: @garryn
                        Web: modx.com