Websites like WordPress and Tumblr allow designers to create themes that users can select. In general how would you architect a website to be flexible enough to allow custom themes for users?
Websites like WordPress and Tumblr allow designers to create themes that users can select.
Share
Take a look on how Django does it. Django uses a Model-View-Controller-like approach in which you use views to populate a context, and then use that context to process a template. Note that Django has its own MVC terminology.
For example, if we say that our context reads as follows (in pseudo code),
we could use the following template:
Now, you are free to replace the template (or collection of templates) with another one without affecting how the site works.