We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34109
    • 119 Posts
    I'm currently building what could end up being a fairly complex repository of articles. One of the client's requirements is to have a number of filters on their content, the first one being a date range. I'm implementing this with a couple of TVs (datefrom & dateto) with an extension to the standard Articles getResources call using the "Other listing parameters" field.

    All good.

    The only issue I have is that to get it working I've had to modify the articlesrouter class to include my new date parameter.

            } else if ($params[0] == 'date') {
                $_GET['date'] = $params[1];
    


    This works perfectly, but I'm concerned that any future Articles upgrades will require me to go back in an reinstate the change.

    Is there another way of handling this or should I stop whinging and get on with it?! smiley

    Cheers,

    Chris [ed. note: [email protected] last edited this post 14 years, 1 month ago.]
      Studio Republic
      http://www.studiorepublic.com
      0845 226 3205
      @christodhunter
      • 3749
      • 24,544 Posts
      I think it's likely that upgrades will overwrite that. You could just back up the file somewhere and copy it back when you upgrade, but then you'd lose any new changes to that file. Even if you could point Articles to your own file, things might still break if Articles is refactored. Be happy that it's a simple change. wink


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html


        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
        • 34109
        • 119 Posts
        Yes, that's what I figured. Already renamed the router class file so all I'll need to do is re-apply the hack. Worth a try - so used to finding more than one way to do things in MODX.

        Cheers Bob!
          Studio Republic
          http://www.studiorepublic.com
          0845 226 3205
          @christodhunter