It looks like you might have solved your problem on the forum post you've linked… but I just wanted to ask what version of Alfresco you're ultimately going to be targeting. You've said you're working on 4.2 but I'm wondering if this is based on the current nightly builds or from one of the community releases last year. The header bar (including the sites menu) has had quite an overhaul (although it's still possible to get the old header back) and you might find that the header bar is easier to customize and that it already provides something closer to your requirements already.
The new sites menu features the most recent sites visited (it still has the favourites in a cascade) as this is actually a more common requirement. It can be configured to show as many recent sites as you like (5 is the default). Even if this doesn't meet your requirements you might find that the new header bar is easier to customize.
If you're an Enterprise customer then what you're doing sounds like it will work on 4.1.x but you might want to wait for 4.2 Enterprise later this year… and if you're a Community user you may also want to check out the nightly builds or check out the latest code as the next Community release will have a different header bar.
As I said though, it is relatively easy to get the old header bar back if you prefer it.