We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38004
    • 96 Posts
    I there anything like Pretty Link for modx?

    For those that don't know PL is a wordpress plugin that allows you to create custom urls for content hosted either on your domain or elsewhere.

    http://prettylinkpro.com/

    I modx version would be great for a number of reasons, particularly for affiliate links.
      • 36457 ☆ A M B ☆
      • 100 Posts
      Currently, MODx can handle those by using Freeze Alias (which mean you can customize your own url).
      Is that what you want to achieve?
        • 38004
        • 96 Posts
        What i want is to take a url such as somelinksomewhereontheweb.com/xyz.html and make it read mywebsitedoman.com/myownurl.html

        If that makes sense.
          • 36457 ☆ A M B ☆
          • 100 Posts
          Oh, then it's just a web_link_resource. You create a web link, type url to the Weblink field, then under resource setting, check on Freeze URI, then type whatever you want for the link, eg: mylink.html. This only works when you set Friendly URLs on (under System Settings>Core>Friendly URL)
            • 38004
            • 96 Posts
            Sounds good.

            Where is the freeze uri setting, i can't find it.
              • 25551 ☆ A M B ☆
              • 1,231 Posts
              If you are using Revo, go in a resource and select the settings tab. If you're using Evo then I don't know if it's an option.
                Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                AugmentBLU - MODX Partner

                BLUcart - MODX Revolution E-Commerce & Shopping Cart
                • 38004
                • 96 Posts
                Nope not there.

                Hold on a minute. I'm in Revo 2.0.8-pl (traditional) when did this option become available? I guess I might need to upgrade.
                  • 36457 ☆ A M B ☆
                  • 100 Posts
                  Um, I think it should be under your new resource(web_link)>Settings Tab. There is a checkbox: Freeze URI. Anyway, 2.2.1 is worthy for you to upgrade, follow the rtfm.modx.com for a secure upgrade.
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    The freeze URI option was added in 2.1, so you'll need to update smiley

                    If you're looking for a way to define multiple links for a single url that may not be your best option as it basically forces a different URL for that resource - might as well just change its alias in 9/10 cases.

                    Could use a simple plugin like this triggering on the OnPageNotFound plugin:

                    $uri = $_SERVER['REQUEST_URI'];
                    $mapping = array(
                      'xyz.html' => 3,
                      'zyx.html' => 4,
                      'xzy.html' => 3
                    );
                    
                    if (array_key_exists($uri, $mapping)) {
                      $modx->sendForward($mapping[$uri]);
                    }


                    Could generate the $mapping array from a resource TV value, get it from a custom table, a plaintext file somewhere on the server.... you name it.

                    Using modX.sendForward will make sure the link stays the same but that it serves a different resource.

                    Weblinks (and the Redirector extra) redirect to the other resource, and freeze_uri still makes the resource available at that link only.
                      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                      • 38004
                      • 96 Posts
                      Basically pretty link does exactly the same a service like bit.ly or tinyurl but you can specify the output name.

                      Does any solution offer this? It's pretty important in terms of marketing.