Blog-level and System-level
In Movable Type 4 there are two levels, Blog and System. Movable Type 5 even introduces a level in between: Website, grouping together a number of blogs. Most of the templates making up the look of your blog live at blog level. But several important pages, like the login form for commenters, the profile view page and some others live at system level.
Because they are located at system level, they are used by everyone on the system, and consequently the look of user profiles, commenter signup forms, commenter login forms etc. is based on the same templates for all blogs. So does this mean they all need to look the same? Hell no!
The blog_id parameter
Often you'll find that a link to a profile, signup form... already has the parameter &blog_id=somenumber attached to it, because the link was generated like that. What few people know is that this parameter can have a drastic effect on the resulting page. This parameter actually sets the blog context for the entire template making up the page.
What this means is that every <mt:include> tag in the template will be evaluated as if this was some index template for the blog that was specified. So if you make sure each of your blogs has a totally different 'Header' module and you include it at the top of (for example) the profile for your user template, Movable Type will magically be using the correct template for each blog.
Want an example?
Check out this French website: http://adidasrunningpartners.com/. It runs on Movable Type (and a long time ago I actually did some work on it). It is a community site for runners using a certain brand of sportswear. There are several subommunities organised by city, for example:
- http://bordeaux.adidasrunningpartners.com/
- http://dijon.adidasrunningpartners.com/
- http://lille.adidasrunningpartners.com/
Each of these communities, as you can see, has its own customized header and sidebar content (different weather report, different colours...). All of them also use exactly the same registration form for new members:
- http://admin.adidasrunningpartners.com/mt-cp.cgi?__mode=register&blog_id=24
- http://admin.adidasrunningpartners.com/mt-cp.cgi?__mode=register&blog_id=30
- http://admin.adidasrunningpartners.com/mt-cp.cgi?__mode=register&blog_id=21
As you can see, the only thing different in the URL is the blog_id parameter, yet on the actual pages you can clearly see the correct headers and sidebars being used, exactly like on the blogs.


Leave a comment