I have a "page variant" system where each page has a "selection" among the "choices" of its "dimensions".
For example, if a page is available in English and French on the Language dimension and for Public, Member and Admin on the Privileges dimension, then that's 6 variants. These variants get compiled separately and are generated from 1 description of the page that includes conditionals that test what variant I'm generating/compiling.
I plan to make much heavier use of this feature in the future. For example, I'd want to have a new Proficiency dimension where I'd have a version for newbies with lots of inline help and hand-holding, a regular version for average users and maybe an expert version for people with advanced knowledge and needs.
And maybe another dimension which selects whether the page should be displayed with or without "teasers", for example if other features are available on that page with a premium account, the user might want to know what he's missing OR he might want to use the free version and not be bothered with upsells for the moment.
Since all these versions are generated from 1 template, drift is very minimal. I don't want to imagine what it would be like to maintain all these separate versions without this system, though I guess I just wouldn't bother with my more advanced ideas...
(Does this feature exist in other web-frameworks? I'm a bit "in my own bubble" ;P)
[1] http://en.wikipedia.org/wiki/Subtext_programming_language [2] http://subtextual.org/subtext2.html (demo)
These days the idea is developed under the name Coherence. Jonathan recently released another paper on the subject at OOPSLA.
Using a tool adapted to the job really can make life easier though.
First, there's the distinction between essential complexity and non-essential complexity. What the OP is talking about is trying to reduce the non-essential complexity by using a more appropriate abstraction. Nested if-then-else can introduce non-essential complexity merely by having dead nested cases which are actually obviated by outer cases; looking at a complex version of this code, it can become quite difficult to see where exactly the code is supposed to flow under what circumstances, as there can seem to be conflicting assumptions in different areas.
Secondly, once upon a time I invented a scheme to solve this problem in the best way I thought possible, and called it "matrix inheritance". The problem with inheritance and subclassing is that it only handles a single dimension of customization. Suppose you have two dimensions, genre and type, such as [comedy, drama] and [movie, series]. If you were to try and classify any given thing under a classical type breakdown, you could subclass by one axes or the other, but you would need to duplicate subclassing for the remaining axes. So, you could end up with Programme, Comedy <: Programme, Drama <: Programme, but then you'd need ComedyMovie, ComedySeries, DramaMovie, DramaSeries, duplicating the kind axis in the two different branches.
The matrix inheritance concept basically takes the cartesian product of all option axes, essentially modelling it as an n-dimensional space, and then applies behaviour to sub-spaces of this space. So, you could apply conditions to [drama, ] and [, series], with these two representing slices of the example 2-dimensional space described above. The advantage of modelling things this way is that it is declarative: you can analyse overlaps and identify un-covered space.