We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36527
    • 120 Posts
    Hi PMS,

    Thanks so much for your efforts and offer.

    I will try and recreate the issue with a new folder/container etc and see what happens, then report back.
      • 17705
      • 501 Posts
      hi!

      I need to do something like this... is this possible to achieve?

      for example I have a main navigation: gallery / artists / expositions / news

      so... when you clic over exposition you will be seeing the current expo info, with artists details etc and the secondary navigation with: Previous / *Current* / Next navigation links... it is all about events... (in an art gallery)

      the previous link will show a page with years, when you clic in each year you will see an artist list, where you can see details clicking over each name...

      but.... in current you will see the current event, showing the info of the "current" artist...
      and in next you will see the upcoming event, showing the info of the upcoming artist....

      so... how can I do in the main navigation to link expositions to the current expo url?
      it is -1 the end of documents (the upcomming event will be the last document, -1 the current.,...)


      any idea? smiley


      regards!
      luciano
        • 22851
        • 805 Posts
        Sorry, but I am having trouble understanding how you want your navigation to work. The Navigator snippet can only help you display information about a ’related’ page on the current page. By ’a related page’, I mean an adjacent document in the MODx document tree, such as a sibling, parent or child. You can use templating to display any information you like about the related page, including a link to it.

        So, if you had a folder full of events ordered by date, you could use this snippet to create links to or display information about the next or previous event on the current page, for example.

        It sounds to me like it would be a good idea to investigate the ditto snippet. If you add template variables to your documents to hold the artist name, event date, event year etc. then ditto will let you select all documents belonging to a specific artist or with a specific date range or year and display information about them or links to them. Look into the tagging facility of ditto, since that may help you achieve what you want.

        Hope that helps.

        Edit: Just noticed that you are a senior member, so you must know about ditto already. Sorry!
          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.
          • 17705
          • 501 Posts
          ehehe, no problem!
          it is nice to see other ways to solve things...

          anyway, here an example document tree...

          home
          artists
          events
          past events
          2006
          2007
          2008
          2009
          event unpublished 1
          event unpublished 2
          event unpublished 3

          current
          upcoming
          contact

          Navigator will show past, current and upcoming...
          but how to do automagically that "events" always go to current? even when the document alias change, it is a new document, etc

          (thinking about it, maybe it is not a Navigator question... lol)
            • 22851
            • 805 Posts
            Could you do this with a weblink which you always point to the most recent event?
              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.
              • 11055 ☆ A M B ☆
              • 3,112 Posts
              Just a hint, you must make sure that the documents’ menu index have been sorted correctly.
              This snippet will sort links alphabetically if the index numbers are equal.

              Anyway PMS,
              The hyperlinks work nice.
              But, I’m not clear about using this one:
              ===================================================================
              Example templates and snippet calls:
              ===================================================================

              Provide links to related pages using the link element:
              LinkChunk: <link rel="[+nav.rel+]" type="[+contentType+]" href="[(site_url)][~[+id+]~]"></link>
              [[Navigator? &rel=`prev` &template=`LinkChunk`]]
              [[Navigator? &rel=`up` &template=`LinkChunk `]]
              [[Navigator? &rel=`next` &template=`LinkChunk `]]

              Where do I should put the link rel?
              It doesn’t work in templates’ header.
                Rico
                Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                MODx is great, but knowing how to use it well makes it perfect!

                www.virtudraft.com

                Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                Maintainter/contributor of Babel

                Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                • 22851
                • 805 Posts
                Hi Goldsky.

                That’s a great sorting tip. Thanks!

                The <link .../> snippet calls should be placed in the <head>...</head> section of your template. The <link> elements don’t put anything visual on the page itself. They are just metadata that:

                a) improve accessibility;
                b) allow browsers which recognise the <link> elements to provide a navigation aid; and
                c) provide bots which read the metadata more information about the structure of your website.

                Currently, Opera has a Navigation toolbar built in, which when enabled, will allow you to navigate the site using the information provided by the <link> elements. For Firefox, an Site Navigation Bar add-on is available which will allow navigation using information provided in the <link> head elements and which also allows access to other metadata.


                  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.
                  • 17705
                  • 501 Posts
                  Quote from: PMS at Apr 23, 2009, 03:50 AM

                  Could you do this with a weblink which you always point to the most recent event?

                  but I need to point to the previous one (the actual...)
                  I mean, the most recent in the site structure will be the upcoming event, and the current one... it is the most recent -1...

                  I have no idea hot wo link to something like that...
                    • 22851
                    • 805 Posts
                    I thought about how I might do what you want a bit. You could structure it like this

                    current-and-old-events-container: You could use ditto and reflect to display archives by year, for example.
                    - older event
                    - ...
                    - older event
                    - old event
                    - current event

                    current-event-page: Use ditto to display the current event. Use the ’current-and-old-events-container’ as the parent for the ditto call. Sort by date descending and limit to the first result to select the current event.

                    future-events-container:
                    - future event
                    - future event

                    So, by sorting, ditto will always find the current event. Then, the only thing that needs to be done manually is to move future events into the current-and-old-events-container. Hope that helps.
                      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.
                      • 27968
                      • 19 Posts
                      Friends! I’ve install Navigator, anв server gives

                      Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ’}’ in /www/solovets/www/htdocs/solovets/assets/snippets/navigator/navigator.php on line 16

                      What does it mean and how to correct it?