We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20364
    • 89 Posts
    Trying to do a pretty basic context thing and am a bit stuck.

    Creating context for various locations of a business. I want them to appear like:

    company.com/newyork
    company.com/losangeles
    etc

    and then the rest of the directory structure obviously comes after..

    company.com/newyork/corporate/aboutus
    company.com/losangeles/media/photos
    etc

    Each context will have it’s own folder structure / resources / etc.

    Any assistance is much appreciated.
      • 21120
      • 30 Posts
      Unless you’re trying to do something with settings or permissions, I think you’d save yourself a headache by just using just one context with your "newyork" & "losangeles", etc. resources as folders.

      If you’re sure you want to mess with separate contexts though, you can rtfm.
        • 22303 MODX Staff
        • 10,725 Posts
        Please see this topic.
          • 20364
          • 89 Posts
          Quote from: neilness at Feb 08, 2011, 01:10 PM

          Unless you’re trying to do something with settings or permissions, I think you’d save yourself a headache by just using just one context with your "newyork" & "losangeles", etc. resources as folders.

          If you’re sure you want to mess with separate contexts though, you can rtfm.
          We would want to set permissions per Context. Essentially, ’newyork’, etc. will be completely different websites, so I am pretty sure contexts will be the best method.

          @OpenGeek .. with that method, I assume you must manually enter the various available contexts within the snippet? Also, which event trigger do you put that on?
            • 20364
            • 89 Posts
            @OpenGeek, any thoughts here?
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: mr.johnny at Feb 08, 2011, 03:37 PM

              @OpenGeek .. with that method, I assume you must manually enter the various available contexts within the snippet? Also, which event trigger do you put that on?
              It’s a plugin (not snippet), and yes, you have to tailor the plugin to do what you want. OnHandleRequest is the event.