We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50485
    • 56 Posts
    I am probably being stupid, but I cannot seem to find a way to create a link from within the content editor of the dashboard to another page/resource in my site.

    My site consists of lots of page which are descriptions of historic buildings. Then I have trail pages where I would like the editor to be able to write the trail in the content box and create links to buildings to see on that trail.

    Can anyone advise? Many thanks, Missusdoubleyou

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      • 50574
      • 70 Posts
      Hello

      With a richtext editor extra installed (TinyMCE or CKEditor for example) you can drag and drop the resource from the resource tree into the content section and it will automatically create a link to that resource. It will, however, use the name of the resource as the link text. So if you need to have alternative text that has the link on it you can type the correct text then drag and drop the resource onto it to create a link using the custom text.

      If you choose go with CKEditor the other way to do it is to type the text you'd like as the link, click the 'create link' button in the editing panel and then use [[~1]] in the URL box Changing the number to match the ID of the resource you'd like to link to.

      Hope this helps.
        • 50485
        • 56 Posts
        Many thanks cotton creative - much appreciated! I knew it had to be simple!
        • discuss.answer
          • 3749
          • 24,544 Posts
          You can also use a link tag (where the number is the ID of the page you want to link to):

          <a href="[[~12]]">Link Text</a>
            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
            • 50485
            • 56 Posts
            Many thanks BobRay.