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

    I have created an articles folder with all my article pages in there (surprise shocked), I have also created a main menu link to this folder. I have also created call to this page using ditto, this display the last three articles on my home page. Here is the code:

    <!-- LATEST ARTICLES FOLLOW -->
    <h4 class="no_margin_top">Latest Articles</h4>
    [!Ditto? &amp;startID=`10` &amp;tpl=`newsChunk` &amp;summarize=`3` &amp;multiLevel=3 &amp; &amp;paginate=`1` &amp;paginateAlwaysShowLinks=`1`]]
    <!-- END OF LATEST ARTICLES -->

    Ok, on to my problem. When I click on an article from the main articles page, you are given the nice SEF URL, something like:

    /my_new_article_1.html

    However, when I click from the feed I have placed on the home page, the url doesn’t display like the above (even though it is the same page, it displays something like this:

    /20

    This is the content ID number. So how do I get my SEF URL’s consistant throughout the site when calling from Ditto?

    Thanks
    Lee
      http://www.blend.uk.com | Web Design by Blend
      • 22815
      • 1,097 Posts
      Can you clarify: is the same template used on both pages?
        No, I don&#39;t know what OpenGeek&#39;s saying half the time either.
        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
        Forum: Where to post threads about add-ons | Forum Rules
        Like MODx? donate (and/or share your resources)
        Like me? See my Amazon wishlist
        MODx "Most Promising CMS" - so appropriate!
        • 33337
        • 3,975 Posts
        I suspect that the alias of document ID 20 is empty... smiley

        Hope this helps.

        regards.

        zi
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 17717
          • 433 Posts
          it is not empty, it displays the url.

          Thanks
          Lee
            http://www.blend.uk.com | Web Design by Blend
            • 18397
            • 3,250 Posts
            What are the templates being used?
              • 17717
              • 433 Posts
              Probably doing this wrong but I have created the following chunk:

              <ul class="news">
              <li><a href="[+id+]"><span>[+date+]</span> // [+title+]</a></li>
              </ul>

              Which I simply call from my home page using:

              [!Ditto? &amp;startID=`10` &amp;tpl=`newsChunk` &amp;summarize=`3` &amp;multiLevel=3 &amp; &amp;paginate=`1` &amp;paginateAlwaysShowLinks=`1`]]

              It displays exactly as I would like it too, its just the urls that don’t seem to inherit their original name.

              Thanks
              Lee
                http://www.blend.uk.com | Web Design by Blend
                • 22815
                • 1,097 Posts
                Well that’s because ditto’s [+id+] isn’t automatically turned into the alias. (Which is a good thing, it lets me create QuickEdit links).

                Try replacing [+id+] with [+alias+].html in your template and all should be well. (There is probably a fancier way too, but this will work.)

                EDIT: What Ditto template are you using on the main articles page (the one that works)?
                  No, I don&#39;t know what OpenGeek&#39;s saying half the time either.
                  MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                  Forum: Where to post threads about add-ons | Forum Rules
                  Like MODx? donate (and/or share your resources)
                  Like me? See my Amazon wishlist
                  MODx "Most Promising CMS" - so appropriate!
                  • 11975
                  • 2,542 Posts
                  Hi,

                  to make the right URL be automatically generated by modx

                  Shouldn’t it be


                  <ul class="news">
                  <li><a href="[~[+id+]~]"><span>[+date+]</span> // [+title+]</a></li>
                  </ul>

                  :-)
                    Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                    • 18397
                    • 3,250 Posts
                    Thank you heliotrope, couldn’t have said it better myself.
                      • 17717
                      • 433 Posts
                      Thanks so much smiley That works great.

                      Lee
                        http://www.blend.uk.com | Web Design by Blend