We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    You should be able to do that (in an HREF attribute of course).
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 3749
      • 24,544 Posts
      That works for Weblinks, but a Symlink placed that way doesn’t seem to do anything (unless I’m doing something wrong).
        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
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: BobRay at Feb 25, 2009, 01:25 AM

        That works for Weblinks, but a Symlink placed that way doesn’t seem to do anything (unless I’m doing something wrong).
        The purpose of Symlinks is to be able to provide more than one access point to a Resource via different URLs in the site. Symlinks use forwarding (i.e. the URL doesn’t change, but the content is rendered as if it were the target page.

        Weblinks are responsible for redirecting the client browser to another URL altogether. This is different than forwarding as it is done externally; and while forwarding is done all within a single request cycle, a redirect triggers a new request.
          • 3749
          • 24,544 Posts
          Thanks. Is there any practical use for these other than in a menu generated by Wayfinder or another menu Snippet?
            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
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: BobRay at Feb 25, 2009, 05:13 PM

            Thanks. Is there any practical use for these other than in a menu generated by Wayfinder or another menu Snippet?
            Another I can come up with off the top of my head is form scripts being able to forward to thank you pages without changing the URL, or login pages, but I’m sure there are others that will emerge as folks begin to make use of this new Resource class. The sendUnauthorizedPage() and sendErrorPage() functions also use this feature, since redirects are not the proper approach here.
              • 3749
              • 24,544 Posts
              Quote from: OpenGeek at Feb 25, 2009, 05:49 PM

              Quote from: BobRay at Feb 25, 2009, 05:13 PM

              Thanks. Is there any practical use for these other than in a menu generated by Wayfinder or another menu Snippet?
              Another I can come up with off the top of my head is form scripts being able to forward to thank you pages without changing the URL

              Would that be accomplished with a Symlink and <form action="[[~nn]]"> where nn is the id of the Symlink?

                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
                • 22303 MODX Staff
                • 10,725 Posts
                Quote from: BobRay at Feb 25, 2009, 09:30 PM

                Would that be accomplished with a Symlink and <form action="[[~nn]]"> where nn is the id of the Symlink?
                Well, no, but you could probably do that too if you had a form processor page that handled POSTs from form pages with different aliases...I was just thinking of a script using $modx->sendForward(nn), not of an actual Symlink when I said that.
                  • 3749
                  • 24,544 Posts
                  Got it.

                  I didn’t think that would work but thought I’d better ask.

                  So, using $modx->sendForward() with the id of a Symlink would keep you at your current URL, but show the content of the "Thank You" page in the Template of the current 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
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: BobRay at Feb 25, 2009, 10:09 PM

                    So, using $modx->sendForward() with the id of a Symlink would keep you at your current URL, but show the content of the "Thank You" page in the Template of the current page?"
                    No, a Symlink uses $modx->sendForward() with the target Resource id; I just got confused and was simply thinking of using $modx->sendForward() in a snippet that processes a form POST to send the user to various response pages without changing the URL. Just a way I have used other Resources for complex forms that have multiple end points which made more sense divided into separate pages. Or at least that way I avoided using too many Chunks or conditionals, which can be harder for less technical editors to maintain.
                      • 18654
                      • 191 Posts
                      I’m trying to use a symlink but so far unsuccesfully. Can someone checkout my attempt and see if I’m doing something wrong? My understanding is that if url_id_80 points to url_id_15 then when I got to url_id_80 it should be the exact same as going to url_id_15. However, it’s not working that way for me.

                      UPDATE: I figured out what I was doing wrong. I was clicking-and-dragging to fill in the Symlink field which put a link tag around the resource. Instead, I just needed to put the resource number and nothing else.
                        God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.