dynamic layout

Also read this blog post: http://errtheblog.com/post/28

It shows many good exampls on how to implement changing sidebars (e.g. wih different links as you said) for each controller or action into one single main layout.