We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20506
    • 10 Posts
    I posted this question before, but got no reply.
    I made a website and using a menu. What happens is that I use chunks in the menu for navigation and in the chunks I reffer to alias of pages. The thing is that when I navigate to my "contact" page all the url codes are changed. Some pages are not accessable because of fault names in the url. Can anybody please help me? I’m stuck for over a month now and can’t find a solution. I’m desperate!!! Look what happens on the site inogenone.eu and navigate to the contact page. Note that the names of the navigation url are changed...
    Thanks for reading.

    gr. Mark
      • 1778
      • 659 Posts
      Hello

      I navigate on your site and I don’t understand what you mean by
      "when I navigate to my "contact" page all the url codes are changed"
      Do you mean you don’t have any "sub-menu" when you’re on your contact page (and you expected to have one)? or do you mean the links inside the page itself don’t reach the right target page ? Or anything else ?

      Try to explain what "normal" behaviour you’re expecting, and how your resources are organised (in the resources tree), give a bit more details on how you built (and/or customize) your menu (Wayfinder ? other add-on ?)...

      Give us some details on your version (Evo ? Revo? release ?) and on your configuration... It’s pretty impossible to give you an answer with only "have a look at my site, there is something wrong" ...

      If you want some of us try to help you, you should give the max informations about your environnement and the add-ons you used, and eventually the code (or part of it) you used...

      Cheers

        • 20506
        • 10 Posts
        I’m using Modx 1.0.4
        If you look in the source code of the homepage you can see the links how they should be.
        In the source code of the contact you can see that the links in the menu are changed.
        I built the site using templates, every page has it’s own, and chunks.
        The chunks are used in the menu and for building the rest of the site.
        I can email the origional template-code with the chunks as well.
        thx. Mark
          • 20506
          • 10 Posts
          UPDATE
          I changed the link inside the contact url chunk from alias into id number of the contact page and the contact page is displayed correctly...
          Seems that referring to the contact page using it’s alias gives the problem...Who knows why?
            • 1778
            • 659 Posts
            Probably because ID is the only data that you’re sure it is absolutely UNIQUE... not the case for aliases..., and ID will NEVER change whatever you do on your document, an alias can be changed (by you, or a manager user) as a title... If you use alias as a reference (instead of Unique ID), and then change only one letter in the alias, your navigation will be broken.

            BTW, you should always refer the pages by their ID,( if you use FURL, the alias (or the menu title if you filled it in) will be displayed instead of the ID number, in your url’s. ) then it’s pretty easy to retrieve datas from a specific a document...
            Hope this helps you to understand why using aliases instead of ID to ’link’ a doc, or to build a menu, is not a good idea
            Cheers
              • 3749
              • 24,544 Posts
              As anso suggests, links should always be entered as [~##~]], where ## is the ID of the page you are linking to. That way, the links will always be correct whether you have friendly URLs on or off and you can change a page’s alias without breaking links.
                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