We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25046
    • 194 Posts
    When I use Ditto on container page (e.g. /articles/) to list the child articles in it, it outputs the correct results. For example it lists all the child documents correctly, complete with the right links. For example:

    /articles/article1.htm
    /articles/article2.htm . . .etc.

    However, when Ditto is on used to list articles in a container of a container, (e.g. /articles/2007/) Ditto returns
    /articles/articles/2007/article1.htm
    /articles/articles/2007/article2.htm

    I’m not sure why it repeats the first container name in the URL which, of course, means the links do not work. Any suggestions? Thanks

    By the way, here is my Ditto call:

    [!Ditto? &parents=`3` &display=`all` &sortDir=`ASC` &tpl=`dittoNews` &trunc=`1` &truncLen=`150`&extenders=`summary` !]
      • 36592
      • 970 Posts
      I think you just need...
      <base href="[(site_url)]" />

      in the <head>...</head> section of your site template.
        • 25046
        • 194 Posts
        Thanks, that did it! I appreciate your help.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          It’s generally better to explicitly close that tag, because IE sometimes chokes on it when it’s self-closed:
          <base href="[(site_url)]" ></base>

          Similar situation to what is described here http://blog.uncommons.org/2007/12/17/the-perils-of-web-development-the-importance-of-testing-and-why-95-of-the-world-couldnt-see-my-web-page/
            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