Hey all, I've been trolling the Wisconsin group for a bit, and was hoping someone with some more experience could help me wrap my head around this problem.
The Setup
There is one "corporate" site. It has recipes in a variety of topics.
There are 8 "franchise" sites. They should be able to show the same recipes as corporate, but as if they were their own. Each franchise site wil also have a few of their own pages, such as About Us, Contact Us, Specials. etc, each editable by people specific to that store.
I'd like to avoid subdomains for the franchise sites, and would love them to have URLs like this:
www.corporate.com/franchise1/recipes/bread <-- list page of recipes tagged with bread
www.corporate.com/franchise2/recipes/awesome-banana-bread <-- view the awesome banana bread node
and it shouldn't matter if they were at franchise1, franchise2, etc, those would all be data from corporate.
However, www.corporate.com/franchise1/about-us would be different from www.corporate.com/franchise2/about-us
My original plan:
Make some views with paths like:
/%franchiseName/recipes/categories <-- to list all the same recipes, however, you can't use a % as the first term in an view path, which made that plan go to hell pretty quickly
then i went with stuff like:
/recipes/%franchiseName/categories <-- and just not do much/anything with that argument, but you can probably imagine it got ugly quickly, because I found myself having to rewrite links ugly all over like /recipes-by-category/%franchiseName/category/bread
I gave up with that plan when I couldn't figure out how to link to an actual recipe node with an argument to "remember" what franchise site we're on.
So, my questions - is there a better way to set up what I'm trying to do? Could Organic Groups be utilized? I dismissed it because it sounds like a tool for a totally different concept, but it keeps getting brought up again and I've never used it.
I've been pointed to Domain, which will probably work, but I think it requries i use subdomains for the franchise sites, such as: franchise1.corporate.com/recipes/bread Is this correct? Does Domain (Access) sound like what I want to use here?
I'd love any other ideas on how to set this up, as it seems like it'd a far-from-rare type of situation.
Thanks in advance for your thoughts, and I do hope to start attending the downtown coffee shop meetups soon, but I'm sans laptop atm :( :( :(
I feel like this is a great TYPE of discussion I can never seem to find enough information on. Is there a better place to see how to use Drupal to set up different 'types' of site models?
- Lems
Comments
the domain module does
the domain module does exactly what you want but you do need subdomains
if you are opposed to subdomains you might try taxonomy and themekey
OG is the way to go
It's odd to think that a module with groups in the title would help, but the name is very misleading. The basic concept behind organic groups is that there is a group node type that contains other nodes. It has been described as a "bucket node" that holds other nodes, and I think that is a good way to think about it.
Since group is a node type, it can be themed per node. This gives you a lot of flexibility. If you want to see a great example of a Drupal package that uses organic groups to create "subsites" you should check out Open Atrium: http://openatrium.com/
So, for your project you could have a group node that represents the main site. It could have page nodes attached to it to form the About Us, Contact Us, etc. Then you make a new group node for each franchise and attach new page nodes for the franchise version of About Us, Contact Us, etc.
You can also have groups share nodes, which is exactly what you are looking for. Groups can also be set to private and be controlled by roles, which means you can control who can add and edit nodes inside of each group.
The cons to this approach is that organic groups is really hard to work with. The module isn't as cleanly implemented as it could be. Also, the distinct feel of each "subsite" is really going to require you to do a lot of per-node themeing. You could probably do this all in CSS though by just put a unique container DIV in each group template.
I also have to admit that I have not built many sites with organic groups (and never one as complex as the one you are trying to build). But I have see what can be done with it and I think it fits your use-case.
Read the documentation on OG here for more info:
http://drupal.org/project/og
posco - thanks, I've actually
posco - thanks, I've actually been playing around with OG all morning and I'm starting to think it fits the bill, and I've already got SOME of what I've been trying to do!
However, I'm really struggling with this:
www.site.com/franchise1/view1
www.site.com/franchise2/view2 <-- how can i make these display the same view?
www.site.com/main-store-node
www.site.com/franchise1/main-store-node
www.site.com/franchise2/main-store-node <-- can i make all 3 of these paths show the same node?
You're right, the documentation seems subpar, and I can't find a good tutorial anywhere! Thanks for help!
Maybe URL aliases could
Maybe URL aliases could help?
http://drupal.org/handbook/modules/path
This would be a little more
This would be a little more complex, but you could also use something like Views Attach to attach a view to a node type. This is another way you could get the same view inside of group nodes.
http://drupal.org/project/views_attach
www.site.com/main-store-node
www.site.com/main-store-node
www.site.com/franchise1/main-store-node
www.site.com/franchise2/main-store-node <-- can i make all 3 of these paths show the same node?
This particular example looks to me like TRANSLATION.
We have a site that uses 10 languages on 2 continents (for a total of 13 distinct translations) and the URLs come out looking like this:
www.site.com/en-eu/sitemap
www.site.com/ru-eu/sitemap
www.site.com/fr-na/sitemap
You can even translate the url path if you want
www.site.com/en-na/tech-info
www.site.com/de-eu/technische-info
This is mostly controlled with the core Content Translation module.
We also use a (very slightly) patched path.module to not barf on the translated url paths.
You can have nodes that exist in all languages (untranslated), or are different for each language.
The system also lets you translate taxonomies, menus, interface strings, and other things.
It may be more complicated than what you need though.