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

    I am working on a project and cannot seem to solve this issue on my own. I have read through these threads:

    http://modxcms.com/forums/index.php/topic,60853.msg349204.html
    http://modxcms.com/forums/index.php/topic,51346.msg298387.html

    However, these don’t quite fit my needs because:

    • I am trying to have contexts as wildcards. So, if you go do domain.com/chicago/photos, it would go look for the Chicago context, and then load the resource named photos. If there isn’t a chicago context, obviously it would fail. But, I don’t want to have to change htaccess and manually add case statements for each.
    • There is no cultureKey, etc. because we aren’t actually doing internationalization. We are using contexts as the various locations ... so domain.com/chicago, domain.com/dallas, etc. It’s really acting more like a Route than a context.

    So I guess two questions:

    • Is there a way to achieve what I am talking about above? (Essentially making contexts as dynamic routes that look like subfolders)
    • Or, is there a completely different / better way to do this? Perhaps simply using a resource folder called "dallas" and "chicago", etc. and then having resources under them?

    Thanks in advance!
      • 22303 MODX Staff
      • 10,725 Posts
      Name the contexts dallas, chicago, etc. and make the plugin simply check to make sure it is a valid context before switching.
        • 20364
        • 89 Posts
        Ok .. I have the contexts and their settings going, and your plugin. Does something need to be done to htaccess for this to work?
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: mr.johnny at Feb 26, 2011, 10:00 AM

          Ok .. I have the contexts and their settings going, and your plugin. Does something need to be done to htaccess for this to work?
          it definitely only works with friendly URLs, if that’s what you mean. But no, there are no .htaccess rules associated with this.