Extend top menu hook to allow more customizations