There are so many ways to accomplish this... it all depends on what you mean by "minor content".
Probably the most extreme solution would be to have contexts for each "subdirectory", as described here
https://github.com/chsmedien/XRouting
A much simpler solution would be to have TVs, perhaps a MIGx multi-field grid TV, to handle the variations, and use the MODX resource tree structure to manage the subdirectory structure. Symlink resources can be used to pull content from the "main" resources, with the TV tags using the actual current resource's ultimate parent to determine which TV to display. Carefully planned naming conventions for the TVs and also for the paths to the images would make it easy.
These are just what come to mind immediately, without a more clearly defined purpose.
-
- 10 Posts
Thanks for the quick reply sottwell! I'll be reading up on MIGx, it looks on the surface to be a possibility for sure. To clarify a little more on what I'm trying to accomplish: The content that would change would be for the most part boiler plate stuff like address, staff, hours etc. But, would probably include a unique editable content area for events and what not. Ideally a site admin would be able to go in, fill out a group of variables (TVs via MIGx possibly?) and get a new location up and running. Thanks again!
discuss.answer
Well, like I said before, there are so many possible ways to do this, the hardest part will be choosing one, then setting it up.
I personally am very fond of MIGx, so that's definitely what I'd go with. The trickiest part would be how to generate the URLs, keeping in mind the need to keep it simple for the site admins. Possibly a Dashboard widget "Create a new location" that will automatically create the new top-level "parent" resource, plus add a Media Source, using the MIGx resource-based dynamic media source path snippet. Then redirect the admin to the editing page for the new top-level resource. Of course, this could also be a full-blown CMP, but since it's not going to be a really interactive feature, just doing some automated stuff based on a single input field (the region, which will be the pagetitle of the new resource) a Dashboard widget would be sufficient.
And you can either use plain MIGx as a TV, or use MIGxDB and store your variable content in its own table. That would have an extra advantage of being easier to manipulate in custom snippets, as well as help in search features.
-
- 24,544 Posts
Another simple way to do it if there's not that much different content is to set placeholders for the variable text and use a snippet in the template that checks the url and sets the placeholders accordingly.