1

NOTE: when I use the term "template" below, I do not mean EE templates. Rather, I mean templates like the ones that can be purchased from www.TemplateMonster.com.

Assume I needed to deploy and manage several similar websites. Is there a way I can set up a few website templates and have the individual websites associate themselves with one of those templates?

For example, say I have 50 sites to deploy and 5 templates to choose from. Sites 1-10 wants to use template 1, sites 11-20 wants to use template 2, and so on. Each site will have a different company name, logo, perhaps slightly different colors or layout, etc. (things that can probably be set as a global variable).

When I make a change to one template, I generally want it to affect all the sites that have chosen to use that template. All the sites will generally have the same data (e.g. if they choose to have a blog, they will all have the same channel fields for blogging, etc.)

I'm trying to figure out if I can set up MSM, then put the template files in some directory that is accessible to the individual sites, then configure each site to just point to the appropriate directory. If this is possible, are there any drawbacks to this approach?

2

If you don't need to give each site control panel level access to change their chosen templates (but instead they'd need to ask you to do this), and you're saving your templates as files, then you can probably just use symlinks.

So your templates directory could look like this:

templates
-- theme1
-- theme2
-- theme3
-- site1 (symlink to theme2)
-- site2 (symlink to theme1)
-- site3 (symlink to theme1)
-- site4 (symlink to theme3)
etc

Not tested, but it should work.

| improve this answer | |
  • That's correct: the individual sites cannot modify the templates themselves; they will need an admin to do this for them). And yes, the EE templates will be saved a files. I guess symlinks will work. I'm not sure what you mean by "not nested", though. Can you explain a bit? Thanks. – ExpressionEngineNewbie Dec 1 '13 at 19:28
  • Sorry - not tested - in that I've never actually done this before. But in theory it's sound. – Derek Hogue Dec 1 '13 at 19:45
  • Wow - must be too early in the morning for me! Yes, "not tested" make sense. I think this will work and I'll probably give it a try. Thanks! – ExpressionEngineNewbie Dec 1 '13 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.