We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40558
    • 1 Posts
    I'm looking for some advice on organizing my front end resources for multiple contexts running on a single MODx instance.

    Is it as simple as creating folders in my asset tree? Also, what is the best way to reference paths to these files? I think using fully qualified paths in the markup might be overkill.

    Thanks in advance for any input/advice!
      • 39932
      • 483 Posts
      It really depends on how your contexts are beings used. For instance, my contexts are subdomains based on functionality. Many people use their contexts as path segments for internationalization (i.e. http://domain.tld/lang/).

      In my case, I keep a tree of document fragments as I develop my site, css, scripts, snippets, and plugins entirely in the front-end and not in the manager. My site uses absolute URLs whenever crossing contexts, but relative when not. On the other hand, my site has a lot of AJAX, so I have a special plugin that saves me a lot of trouble with URLs.

      In the case of internationalization, most copy their resource tree from the main context to their language contexts. Generally relative URLs work well for these as long as they develop their chunks, snippets and TVs correctly.

      So, the real question is what are you doing with your contexts? How are they used? [ed. note: fuzzicallogic last edited this post 11 years, 9 months ago.]
        Website: Extended Dialog Development Blog: on Extended Dialog
        Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
        Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

        Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".