We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    No problem. Glad to see Navigator being put to good use.
      YAMS: Yet Another Multilingual Solution for MODx
      YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
      Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
      • 11920
      • 8 Posts
      Yes. Thanks for the contribution. It was exactly what we needed.
        • 1841
        • 141 Posts
        Will this snippet be updated for revolution, I love the snippet but want to start planning the move now Revolution has reached RC1
          • 22851
          • 805 Posts
          Hi antsplace.

          Sorry to say that I don’t have any immediate plans to ’Revolutionise’ this snippet. It’s the kind of thing I’d like to do because it would be a good starting point for learning more about Revo, but I don’t really have the time at the moment I’m afraid.

          That said, it’s a fairly simple snippet that uses the standard MODx API, so if there is a guide to converting Evo snippets to Revo snippets somewhere, then it should be fairly straightforward for a coder to convert it.
            YAMS: Yet Another Multilingual Solution for MODx
            YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
            Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
            • 1841
            • 141 Posts
            Hi PMS, thanks for the reply. When I manage to get it converted I will let you know, I would like to transfer my site to revolution eventually but your snippet is a must!

            Thanks again.
              • 24399
              • 12 Posts
              Hi PMS,

              thanks a lot for this snippet. Is there a possibility sort prev/next pages by ID or date? My call at this time is like this:
              <li class="previous">
              [!Navigator? &rel=`prev` &type=`contentType` &transcend=`0` &notInMenuAction=`link` &unpublishedAction=`link` &template=`site-nav-prev`!]
              </li>
              <li class="next">
              [!Navigator? &rel=`next` &type=`contentType` &transcend=`0` &notInMenuAction=`link` &unpublishedAction=`link` &template=`site-nav-next`!]
              </li>


              Thank you in advance,
              Radulph
                • 4952
                • 13 Posts
                Hi everyone,

                I hope someone can answer the following question.


                I have a document tree that looks like that (every document shows in menu and is published):

                -> A
                -> Ape
                -> Asia
                -> B
                -> Bed
                -> Breakfast
                -> C
                -> Coca Cola

                ...and so on.


                Now for example if I’m at "Asia" I want the next button to link to "Bed", if I’m at "Bed", I want the prev button to link to "Asia".

                Is this realisable with Navigator? I had no luck with PrevJumpNext or NavigateSiblings.


                Thanks in advance!

                Daniel
                  • 22851
                  • 805 Posts
                  It appears I stopped receiving notifications about this topic for some reason, so I’ve only just seen Radulph’s post. In answer to Radulph’s question, no. Navigator displays all output in menuindex order. However, with some minor modifications to the code it should be possible to get it to sort by date order instead, although the results might not make much sense when using transcend mode. It’s been a while since I looked at the code, but I note that there is a GetSiblingId method which contains the code
                      // Get the immediate siblings (and the current document)
                      $siblings = $this->modx->getAllChildren(
                          $parentId
                          , 'menuindex'
                          , 'ASC'
                          , 'id'
                      );
                  

                  Switching ’menuindex’ to ’editedon’ would probably do the trick.

                  charger15. You’re lucky. I just happened to catch your post as I scanned the MODx RSS feed. Yes, Navigator will do what you want. Just use [tt]&transcend=`1`[/tt].
                    YAMS: Yet Another Multilingual Solution for MODx
                    YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                    Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
                    • 4952
                    • 13 Posts
                    Hi PMS,

                    Thanks for your answer. Now I understand, what transcend does.

                    I just wanted to say that I would love to see Navigator for Revo! I try to convert it by myself but had no success so far.

                    Any help is much appreciated!


                    For example I tried to convert this "evo"-line

                    $doc = $this->modx->getPageInfo($id, 0, 'type,published,hidemenu,deleted' );


                    to this "revo"-code

                    $resource = $this->modx->getObject('modResource', $id);
                    $doc = $resource->get('type,published,hidemenu,deleted');


                    Is it correct this way?
                      • 22851
                      • 805 Posts
                      I’m not able to give you a definitive answer I’m afraid. Taking a look at the "Getting Object Fields with $object->get()" section of Bob’s Guides to Revolution Objects suggests you are right, but I can’t be sure. I’d suggest asking the same question in a different forum (Revolution).
                        YAMS: Yet Another Multilingual Solution for MODx
                        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.