We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13354
    • 7 Posts
    jackrowlands Reply #1, 8 years ago
    I currently Use a Single Page In Modx to return dynamic data from a web service based on its ID passed on the end of the URL.
    What I would like to do is alter that URL to show additional data dynamically.

    Current URL Structure is : /lettings/details?ID=KCA150260&Area=south-kensington

    I would like to change the URL to the following: /lettings/south-kensington/details?ID=KCA150260

    Does anyone know of a way to achieve this or help with best practices ?

    Thanks
    Jac

    This question has been answered by Bruno17. See the first response.

      • 3749
      • 24,544 Posts
      Can you give more details about your use case? Are those URLS actual page URLS at the site, values in a snippet, links in a page, or what?
        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
        • 13354
        • 7 Posts
        jackrowlands Reply #3, 8 years ago
        Thanks for the response.

        The /lettings/ is a page, which pulls content from a web service using a snippet. When you click on the Property, it links to /lettings/details which is also set up as a page but passes the ID through the URL and data is presented on the template via a different snippet.

        So these two URL's are actual page URLS. But I wanted to know if i could pass a dynamic value through such as the Area and create a URL from this.

        EG : /lettings/details?ID=KCA150260&Area=south-kensington would become /lettings/south-kensington/details?ID=KCA150260

        Where south-kensington would be a dynamic value and not be a dedicated page itself. Do you know if this is doable? Or would i need to create a seperate page inbetween and change the urls dynamically somehow?

        Hope that all makes sense.

        Thanks

        • discuss.answer
          • 4172
          • 5,888 Posts
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 13354
            • 7 Posts
            jackrowlands Reply #5, 8 years ago
            Thanks Bruno,

            This worked a charm.