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

    Example I created many pages/documents
    page1
    page2
    page3 etc..etc..
    each of these pages would have ID numbers

    when creating a new template do I add the hyperlink such as "/index.php?id=1" "/index.php?id=2" /index.php?id=3" etc?
    is this the right way to do it? can I not add alias? page1.html, page2.html, page3.html etc?


      • 2734
      • 165 Posts
      Hi revolver

      You should add hyperlinks using the following placeholder [~id~]

      Example:
      <a href="[~22~]">Linkname</a>
      

      Where 22 would be the Document ID you want to link to.
      The advantage of this approach is, that MODx will create the correct URL for you, even if you move the Site to a different server or change from friendly URLs to normal URLs and vice versa.
        • 24904
        • 79 Posts
        thanks for that buddie smiley