We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28554
    • 201 Posts
    Hi again!

    Yes, another question. Don’t worry, I’m molding all of this into a giant "Setting up a site in MODx for total beginners" tutorial.

    Is there a good approach to influencing the URL-path in MODx CMS? Lemme explain again by stating the case:

    I want to add a blog-item to my website (www.digitaaldier.nl). A blog-item is a child-page of the parent "Blog", and the template for all children are forced by the "Inherit Selected Template" plug-in. I want the URL of the item to be www.digitaaldier.nl/blog/2010/05/26/article-alias instead of www.digitaaldier.nl/blog/article-alias.

    If there’s a sort of generic approach to this problem it would make me a gazillion times more flexible in setting up a site in MODx.

    Again, thanks for all the kindness and general readiness to answer even the noobest of questions, I’ve never felt as free to ask questions anywhere as I have here!
      • 6228
      • 249 Posts
      That’s a tough one.

      I accomplished something similar using a reverse template in osCommerce. My shopping cart pages are accessed directly via their native URL, but all of the pages are buffered. The shopping cart script CURLs a MODx template, replaces specific tags with the buffered cart contents, and displays the results.

      An other way would be to find out how to map blog URLs to one MODx template page, and have MODx forward said request to the blog to fetch its contents. I’m thinking it may be doable with mod_rewrite, having a conditional that triggers on /blog and forwards the remainder of the path as a query string. Then, the template page can reconstruct the blog url using the query string.

      I’m a firm believer that 99.9% of ideas are possible with MODx, it’s the level of difficulty that makes the work practical or not. Hopefully you will have some luck!

      - Mike
        lo9on.com

        MODx Evolution/Revolution | Remote Desktop Training | Development
        • 22303 MODX Staff
        • 10,725 Posts
        First, I would personally create containers for the year and month, and put the actual pages at those URLs. This is more for organizational purposes, but also solves your URL problem. I mean, when you have 100 blog posts, looking through a single folder of articles is going to become unmanageable. Plus, then you can setup the containers to show posts for a specific year or month. This is how I setup my "blog"-like structures in MODx. In addition, then your archives are really just a Wayfinder instance, looking at past months and years.
          • 28554
          • 201 Posts
          Quote from: OpenGeek at May 31, 2010, 02:53 PM

          First, I would personally create containers for the year and month, and put the actual pages at those URLs. This is more for organizational purposes, but also solves your URL problem. I mean, when you have 100 blog posts, looking through a single folder of articles is going to become unmanageable. Plus, then you can setup the containers to show posts for a specific year or month. This is how I setup my "blog"-like structures in MODx. In addition, then your archives are really just a Wayfinder instance, looking at past months and years.

          Well, I sort of get that, and that’s ok for sites I manage, but I don’t wanna burden a client with having to make the month-pages as they go along. I was hoping there was some sort of hook for doing this... Thanks anyway!