We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5390
    • 16 Posts
    Hello All, Me again laugh

    I was wondering if anybody could shed any light on how to do a navigation like this

    eg..

    Link1 - Link2 - Link3

    Where it says links id like them to be my modx pages.

    Also i have serval sections on my site, should like to show the links the same on the septerate section page (if that make any sense)

    Thanks in advance
    Ian
      • 15001
      • 697 Posts
      Hi Ian,

      Not sure that I understood exactly what you want to do.

      Basically links are classical anchors :
      <a href="linked_page.html" >Link 1</a>


      You can also put your MODx document id in the href :
      href="[~40~]"


      Now, from what I undertand, you want to split one of your article into several smaller sections.
      You can do this with the Ditto snippet.

      I don’t have any ready-to-use Ditto configuration for what you want to do, but this should not be much difficult once you undertstood how to build chunks with placeholders and how to use Ditto.

      The GetLink snippet might also be useful if you want to display the tiles of the linked documents as text in your anchors.
      Il you just want to split one document in many parts Ditto will be sufficient.

      Ditto or Wayfinder can also be used to make links to child documents.
        • 15451
        • 87 Posts
        hi there ian, i started typing then saw the other post, so not sure if what i’ve written is what you were wanting or not.
        do you know about using wayfinder to build your nav? a couple of links that i’ve found helped a lot are http://wiki.modxcms.com/index.php/Beginner%27s_Guide_to_MODx and http://wiki.modxcms.com/index.php/Wayfinder . your nav can be repeated on all pages like you want it to be.
        also at the top of http://wiki.modxcms.com/index.php/Wayfinder200 there’s a link to a zip file that’s really good.
        although you might just be wanting links like the fellow in the last post suggested...
          • 5390
          • 16 Posts
          Thanks for your replys,

          I have used WayFinder

          And it puts them like this


          • Link1
          • Link2
          • Link3

          Pref would like to do it like this

          Link1 - Link2 - Link3 (using Way Finder)
            • 15451
            • 87 Posts
            might be worth looking at that first link then, http://wiki.modxcms.com/index.php/Beginner%27s_Guide_to_MODx . about a third of the way down look for the heading ’Orientation of the Menu’. the stylesheet info is at the bottom. wink
              • 15001
              • 697 Posts
              This is because Wayfinder uses default <ul>...</ul> structure for each node and <li>....</li> entries for each child document.

              You’ll have to define different chunks corresponding to Wayfinder’s parameters, especially &outerTpl and &rowTpl.

              I advise you to look at the examples in assets/snippets/wayfinder/examples
              and then at the configs in assets/snippets/wayfinder/configs to understand how it works.

              The big advantage of using a config file is that it’s easier to edit than separate chunks stored in MODx.
              With a config file, you edit several chunks at a glance.

              Then your Wayfinder call will look like [!Wayfinder? &config=`your_config_file_name.config.php` !]

              In your config file, you’ll have to set for your rowTpl description, something like
              <a href="[+link+]" >[+linktext+]</a> -

              (I’m not sure about the placeholder names. Look in example config files.)

              See also the zip file that you can download here, which contains very good and detailed documentation:
              http://wiki.modxcms.com/index.php/Wayfinder200

              For the last child of each node, you’ll have to avoid writing an hyphen after the anchor.
              There’s some &lastRowTpl (not sure about the name) parameter in Wayfinder that you can use to set this exception.

              Hope this helps.
                • 25551 ☆ A M B ☆
                • 1,231 Posts
                here are some simple UL examples I just typed up... You would apply the logic to your Wayfiner Tpl chunks.

                http://www.rossco-designs.com/index.php?id=355
                  Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                  AugmentBLU - MODX Partner

                  BLUcart - MODX Revolution E-Commerce & Shopping Cart