We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Thanks Ryan for the great marketing material grin !

    (And great thread really !)
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 6016
      • 55 Posts
      Quote from: ZAP

      Here’s my quick and dirty previous/next links snippet.

      ZAP, given the context, is it fair to assume that this snippet implements the Next/Previous links as described in my review?

      And either way, it will be very helpful, if possible, to have a link pointing to a website where this snippet is in use.

      Rahul
        • 6016
        • 55 Posts
        Thank-you all for the several detailed explanations of what MODx "does". You have certainly provided me with your perspective in a very articulate manner. I will take a little time off to get some real work done, then return here with some more comments.

        Rahul
          • 33372
          • 1,611 Posts
          Quote from: crossconnect at Jan 25, 2008, 01:59 PM

          Quote from: ZAP

          Here’s my quick and dirty previous/next links snippet.
          ZAP, given the context, is it fair to assume that this snippet implements the Next/Previous links as described in my review?

          And either way, it will be very helpful, if possible, to have a link pointing to a website where this snippet is in use.
          Yep, this is a snippet to add previous/next links (with a JavaScript jump menu in between them). It’s just something simple that I did for a site that needed it, and in general when people ask questions on the forums about things for which other people have info or code snippets we share it. Since this particular piece of code is probably not significant enough to be worth making available as a MODx resource, that’s probably how someone who had a hard time doing it on their own would get it (they’d just ask on the forums and someone would post it for them).

          As a rule I don’t post public links to the sites we do, sorry. (EDIT: Actually, I can put up a temporary link on an old test installation that I have kicking around if you just want to see how it works: http://www.zoomzap.com/test-zone/test/one.html )

          I still haven’t read through this thread or your original review, btw, but maybe this weekend I’ll have a chance.
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn't very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 6016
            • 55 Posts
            Quote from: ZAP

            Actually, I can put up a temporary link on an old test installation that I have kicking around if you just want to see how it works: http://www.zoomzap.com/test-zone/test/one.html

            It’s a bit hard to tell much from that link. You have a set of sibling pages. I don’t see the links spanning more than one subtree, so I can’t tell if your snippet would actually do a preorder traversal if the links crossed multiple subtrees and multiple levels of nodes.

            Maybe it would -- I just can’t tell from that particular example.

            Rahul
              • 6016
              • 55 Posts
              Quote from: ZAP

              Just because Ryan asked to see it, here’s my quick and dirty previous/next links snippet.

              OK, either I’m not understanding your code, or it doesn’t do what I think it is supposed to. I’m not a habitual PHP programmer, but I think I figured out the essence of what each line does.

              Suppose A and E are sibling nodes in your web site document tree, each corresponding to a web page.

              B, C, and D are sibling pages, all under A.

              When the user visits page A, the Next link will point to page B.

              When the user visits page B, the Next link will point to page C, and the Previous link will point to page A.

              I’m not able to understand how in your code the Previous link pointing to A, seen when the user visits page B, will be created.

              And when the user visits page D, the Next link should point to A’s sibling E, and I’m not understanding how your code will create this Next link.

              Rahul
                • 33372
                • 1,611 Posts
                Quote from: crossconnect at Jan 25, 2008, 05:01 PM

                OK, either I’m not understanding your code, or it doesn’t do what I think it is supposed to...

                That snippet just adds previous/next links within the same container (since that’s what I needed to do, and I wrote it for my needs, not what might occur to you in the future). I actually used this snippet on the site I made it for in combination with previous/next section links (which appeared below this and jumped to the previous/next container). I just used Template Variables to create those links (since they didn’t change throughout the section), so there’s no code to show for those at all (although I could’ve used the same snippet with the parent ID in place of the document ID).

                I’ve never needed to use previous/next to navigate throughout an entire website structure (that actually seems like a rather odd thing to do to me, especially if you’re saying that you want to traverse nested subdirectories...). You could certainly do it easily enough though by modifying my code slightly so that it looks inside the current document for the next one if it’s a container and looks for the next document on the parent’s level when there are no more child docs in the current container. That seems less useful to me than having previous/next section links on all of the container documents (and once you have multiple nested subdirectories you’ll need to decide what constitutes previous and next in that situation), but if that’s what you want to do, you can. It doesn’t seem like something that a whole lot of people would want to do, so that’s probably why there’s no existing snippet that does exactly that. But that’s the nice thing about MODx: You can implement any wacky idea that crosses your mind instead of being limited to what the software’s creators decided was the "right" way to do it.

                If you were actually creating a site and needed this specific feature for it, I would probably take the time to tweak my code for your situation, but since this is a purely theoretical exercise...
                  "Things are not what they appear to be; nor are they otherwise." - Buddha

                  "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                  Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                  • 6016
                  • 55 Posts
                  Just wanted to let you all know that this has been a busy week. I still intend to make some revisions to the review soon, and will post some responses here too, soon.

                  Rahul
                    • 14545
                    • 3 Posts
                    Ryan,

                    Regarding:
                    MODx does not do workflow publishing. MODx does allow you to work out a simple publishing workflow "hack" by creative use of manager groups and publishing permissions.

                    Is there anyone using this type of workflow hack or any documentation anywhere on that? Any info would be awesome. I’m responding to a request for proposal that requires some limited versioning.

                    -John (5Q)
                    • There’s no code hack, just a use hack, per se. You essentially don’t give the editor/author group the ability to publish, but you do give them the rights to create new content.
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me