We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29635
    • 361 Posts
    Hi all. Too busy to pull this off in-house and our usual "extras" are all busy as well, so posting here.

    By default, MODx image and file TVs open the resource browser to /assets/images/ and /assets/files/, respectively.

    I want a plugin (or core hack, if necessary) to make the resource browser open to /assets/images/id/413/, where 413 would be the ID of the current document.

    Ideally it would open to that folder, but would allow the user to navigate back up the directory structure (which is built into the resource browser), but if that’s not possible, it’s ok. This isn’t a big deal either way.

    If anybody wants to pull this off please PM me an estimate. My hunch is that it’ll either be quite easy, or really stupidly difficult. I haven’t had the time to look into it so I don’t know. If anything is unclear from this description please let me know and I’ll clarify. Thx all.
      Need MODx Ecommerce? Try FoxyCart!
      • 29635
      • 361 Posts
      Ok, so it was actually really easy:
      http://www.modxcms.com/Document-Specific-Resource-Browser-Paths-0.1-2265.html

      In case anybody wants something like this, there it is.
        Need MODx Ecommerce? Try FoxyCart!
        • 7231
        • 4,205 Posts
        LOL this happens to me all of the time, where I think something will be tough to figure out and actually it is not too bad. I will look into this resource for sure. Thanks.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 29635
          • 361 Posts
          I think it could potentially be improved if it allowed traversing back up the tree, but I didn’t see a way to do that (though I only looked briefly).

          Future improvements could also potentially do the same thing but for webusers rather than doc IDs. That’d be fun.

          EDIT: It could be improved if there wasn’t a javascript error that prevented files from uploading. OOPS. Fixing now.

          EDIT AGAIN: Works now, mostly. Seems like 1 in 10 times it’ll either not work, or it’ll load up the contents of the folder twice... Losing my mind trying to figure that out.
            Need MODx Ecommerce? Try FoxyCart!