We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13695
    • 15 Posts
    Sorry if this is very basic, I’m looking to create a small menu which would navigate the childs of a container a user is currently in, a bit like a forum, for Example: Pages: [1] 2 3 4.

    I’ve looked everywhere for some instructions on this. I’ve seen the DocLink and PrevJumpNext snippets, but they don’t seem to have this functionality. Is there a way to do this with Wayfinder, or is there a particular snippet?

    Many thanks

    Jason
      • 26016
      • 561 Posts
      Hi,
      You could use Ditto or Wayfinder for this. But there’s no automatic instant way to do it.

      Say you were using Ditto (I typically do). You put this Ditto call in the root document. It should display the first child, and links to the others. In my example, I fill in the Summary document field of each child so that you have an intro to the full document’s content.

      Ditto call:
      [[Ditto? &startID=`[*id*]` &summarize=`1` &tpl=`ditto_template` &paginate=`1` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`1`]]


      Then you need a chunk which becomes a template for output.

      Ditto template chunk named "ditto_template":
      <div class="ditto_summaryPost">  <p><a href="[~[+id+]~]" title="[+title+]">[+title+]</a> <br />[+date+]</p>  <p> [+introtext+]</p>  </div>


      Then you can style your output as desired with CSS and/or playing with the template. I hope that helps.

      Good luck, Dave
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 13695
        • 15 Posts
        Thanks Dave, is there a way that this technique could work with in tandem with the a nav menu? I have the menu on the left which has the direct link to each child, the 1 2 3 4 bit is to work as an additional navigation for ease of use... Perhaps this is a wayfinder job?

        J
          • 3749
          • 24,544 Posts
          Here’s a previous/next snippet that might serve as an alternative:

          http://modxcms.com/extras/package/?package=351

          It lets you jump to any page.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 26016
            • 561 Posts
            Yes, Try BobRay’s thing, it may be easiest.

            And yes, Wayfinder could be used as a component of this, or instead of Ditto. I actually use Wayfinder for my sitemaps... works better than the sitemap snippets I’ve seen with a pinch of CSS.

            I was going to suggest a Wayfinder call in content... you could use numbers in the "Menu Title" field, do some styling, and then you’d get a 1-2-3-4 type of thing as your links. The only glitch there is that unlike Ditto, you don’t maintain the 1-2-3-4 menu thing at the bottom when you follow a link to its page.

              MODx and Wordpress development
              Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4