Per-city subdomains - any way to support it?
Permalink
Here is the problem I face with some of my client:
They have local stories in several cities. In fact, there are maybe 50 or something like that cities now, and they may grow up.
They want to have subsites for these cities to be slightly different. So, maybe the "About" page may be the same for these subsites, and "Addresses" and "Welcome" pages are different.
I don't want to use Domain Mapper plugin, as I hate the idea of having 50 "just about the same" subfolders (and if some page are the same and I need to edit that pages the I'll need to use symlink or edit each instance!).
What will be the best way of solving this? Indeed, Concrete5 will be fine for this company, they will love the UI, but dealing with subdomains will be the pain unless i find a smooth way to implement it.
They have local stories in several cities. In fact, there are maybe 50 or something like that cities now, and they may grow up.
They want to have subsites for these cities to be slightly different. So, maybe the "About" page may be the same for these subsites, and "Addresses" and "Welcome" pages are different.
I don't want to use Domain Mapper plugin, as I hate the idea of having 50 "just about the same" subfolders (and if some page are the same and I need to edit that pages the I'll need to use symlink or edit each instance!).
What will be the best way of solving this? Indeed, Concrete5 will be fine for this company, they will love the UI, but dealing with subdomains will be the pain unless i find a smooth way to implement it.
Oh, thank you for the answer, the approach looks promising, but what I miss is how should I deal with adding more cities in the future?
Also, if there'll be say 50 or even 100 cities, it looks like I'll need to add 100 editable regions and consider which of them to use while adding the content - mess a bit, isn't it?
May there be any way of marking (tagging) some content with named of cities (and maybe with tag 'all' for content to be shown on every city page? I'm a bit new to Concrete5, so I miss the way to tag the content blocks itself - is it possible at all?
Also, if there'll be say 50 or even 100 cities, it looks like I'll need to add 100 editable regions and consider which of them to use while adding the content - mess a bit, isn't it?
May there be any way of marking (tagging) some content with named of cities (and maybe with tag 'all' for content to be shown on every city page? I'm a bit new to Concrete5, so I miss the way to tag the content blocks itself - is it possible at all?
managing 50 or 100 cities will be a mess anyway. Adding cities is no problem: make a new theme ("city_21") and increase the number in the for-statement. (could define the number in the config file...)
Tagging blocks for display on city-pages (themes) could be done with css-classes in the design of the blocks. But this means to write the names rather than selecting something (i.e. class="city-1 city-3 city-13") and managing the classes in the theme template with "display:none;".
You also may want to combine both of this methods!
Tagging blocks for display on city-pages (themes) could be done with css-classes in the design of the blocks. But this means to write the names rather than selecting something (i.e. class="city-1 city-3 city-13") and managing the classes in the theme template with "display:none;".
You also may want to combine both of this methods!
take the theme switcher addonhttp://www.concrete5.org/marketplace/addons/theme-switcher/... and create a theme for every city. You could use shared ressources for all the themes (perhaps make a package from the themes...) to avoid multiple coding.
for the individual content you have different areas in every theme's template. And in your default template (the one you use for editing the site!) you define all of them.
If you edit a page you get as many areas as there are cities and you may give them all individual contents.
/packages/cities/themes/city1/default.php would look something like that: