We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18597
    • 12 Posts
    Hello.. im in my first Modx proyect and im stuck in the way to make links in the content of my pages to other documents. I dont want to use ID number because im going to duplicate my pages. Im using Ditto now:

    [!Ditto? &startId=[[*parent*]]&depth=`2` &display=`1`&sortBy=`menuindex` &start=`14`&summarize=`1` &hideSubMenus=`TRUE`!]

    Is this the best way? how can i say ditto to go to a specific document without using ID numbers???

    I HOPE THIS IS NOT TOO WEIRD QUESTIONS.. PLEASE NEED SOME HELP.. STUCK IN HERE AND FEELING DEPRESSED wink

    THANKS A LOT

      • 16278
      • 928 Posts
      Is it a navigation menu you want to create, or a list of documents and links to them? If it’s navigation, it might be better to look into Wayfinder.
      If you are using Ditto, and you have the current version (2.1) as installed with MODx 0.9.6.3, then some of your parameters won’t work at all, and some are only there for compatibility with older versions. You’d maybe get closer to what you want with something like:
      [!Ditto? &parents=[*parent*] &depth=`2` &display=`1` &orderBy=`menuindex ASC` !]
      &startID is obsolete (it is turned into &parents for the sake of compatibility), and [*parent*] needs only one pair of brackets;
      I don’t think &hideSubMenus exists in Ditto 2.1 (there is a &hideFolders parameter, which takes`1` and `0` as values rather than TRUE and FALSE);
      &summarize is turned into &display by the snippet code;
      &start=`14` tells Ditto to skip the first 14 returned documents - is that what you mean to do? And then only display the first of them?
      Can you provide some picture of the kind of structure you want to build?
      smiley KP
      Notes on using Ditto 2.1 at http://www.pogwatch.com/ditto/
        • 7231
        • 4,205 Posts
        Quote from: kp52 at Jun 09, 2009, 06:28 AM

        Notes on using Ditto 2.1 at http://www.pogwatch.com/ditto/
        That is great Ditto documentation with examples...I did not know of this resource, thanks grin grin grin
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 18597
          • 12 Posts
          thanks for helping! wat i really want is to create links in my content to documents in my tree... huh uhmm obviusly im very confused!
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            <a href="[~xx~]">...</a>

            where the xx is the document ID of the one you’re linking to. MODx will automatically create the proper URL.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org