We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33337
    • 3,975 Posts
    What is the difference between a Weblink and a Symlink?

    As I am starting to play with the recent alpha build, I am seeing them in the top navigation, and both looks equal in terms to visual data entry form. So whats the difference? tongue
      Zaigham R - MODX Professional | Skype | Email | Twitter

      Digging the interwebs for #MODX gems and bringing it to you. modx.link
      • 25483
      • 741 Posts
      I think a Weblink links to the specified page and a Symlink will pull the content like it is the document

      So weblink will do this: http://domain.ext/weblink.html goes to http://domain.ext/linkeddocument.html
      And a Symlink will pull the content from http://domain.ext/linkeddocument.html and shows it on http://domain.ext/symlink.html

      Don’t know for sure, but that’s the way a symlink works on linux.
        with regards,

        Ronald Lokers
        'Front-end developer' @ h2o Media

        • 25663 MODX Staff
        • 12,272 Posts
        And that’s the way it works in Revo. Weblinks redirect to another page or site. Symlinks only work for internal pages, and "pull the content in" maintaining your position in the navigation heirarchy. Combined with some of the parameters that can be passed in with Revo you can do some interesting things like dynamically changing the title displayed on the page or the subject field on a form.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 26903
          • 1,336 Posts
          I’ve created a symlink in my revo test installation, in the ’SymLink’ field I’ve put the document id of the document I want to symlink to. This works OK for content but it doesn’t use the template I’ve specified for the symlink resource, ie it uses the template of the document I’ve symlinked to.
          Is this correct operation or do I need to do something else?
            Use MODx, or the cat gets it!
            • 25663 MODX Staff
            • 12,272 Posts
            That’s the expected behavior. Behind the scenes, weblinks HTTP redirect, symlinks forward.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: shamblett at Dec 16, 2008, 08:19 AM

              This works OK for content but it doesn’t use the template I’ve specified for the symlink resource, ie it uses the template of the document I’ve symlinked to.
              Is this correct operation or do I need to do something else?
              That is intended behavior -- the template of the symlink is meaningless other than for relating template variables to that symlink for identification/menuing purposes.
                • 33337
                • 3,975 Posts
                Very helpful, thanks for the explanations guys smiley
                  Zaigham R - MODX Professional | Skype | Email | Twitter

                  Digging the interwebs for #MODX gems and bringing it to you. modx.link
                  • 3749
                  • 24,544 Posts
                  I have to confess that I’ve never used (or needed) either one and from the discussion above, I assumed that they could be embedded in a page and would provide a link to or pull content from another page.

                  After experimenting, it looks like I had them all wrong. Am I correct in assuming that they are only for use as pseudo-documents that Wayfinder and other menu snippets can use to produce menu items?

                  Do they have any other uses?
                    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
                    • 25663 MODX Staff
                    • 12,272 Posts
                    That’s pretty much it indeed Bob. Or you could use them as a shortcut link to other sites, like the wiki or JIRA on the MODx site.
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 3749
                      • 24,544 Posts
                      Quote from: rthrash at Feb 24, 2009, 11:44 PM

                      That’s pretty much it indeed Bob. Or you could use them as a shortcut link to other sites, like the wiki or JIRA on the MODx site.

                      Can a Weblink be embedded in a document’s content to provide a link to a page at another site? I tried putting [[~21]] on a page (where 21 was the ID of the Weblink) but all I got was ?id=21 in the rendered page.
                        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