I found a very interesting thing about MSM, and I don’t know if I am sharing it, reporting a bug, or something else.
When we created our templates on the main site we always have a “inc” template group with the .header and .footer - these two files basically make up the entire design and then on each template we just embed these two files at the beginning and at the end, like so:
{embed="inc/.header"}
Content for page goes here
{embed="inc/.footer"}Well we setup a new MSM site with a subdomain and we tried to embed and we found out a number of interesting things. Even though the number is small, it has huge implications.
1. Variables do not transfer through sites, so if you want to have global variables they have to be defined in each MSM because even though you are embedding a template from another site, it is looking for the local site Global Variables, either that or define them each in your path.php file (but still they must match between sites).
2. Relative Pathing - depending upon how your server is setup you really have to think through your relative pathing (this is not an EE thing, but rather a code thing). This even means how to you path elements in your CSS.
3. Saving Templates as Files - we found out that no matter what we did to our server configuration we could not save the files unless we saved them on the primary site path (this could be a bug, but again like #2 above it depends on how your server handles subdomains). I haven’t test this, but I am thinking we may run into this similar issue on images as well.
Note: Our server setup for domains is that each domain is independent of the primary domain for security reasons. So each subdomain has its own httpdocs directory and not pointing to a folder on the main domain (this could be part of the issues).
#3 may be a bug so I would be interested if anyone with our similar server setup is running into these issues.
enjoy…
bjs