add a configurable limit to the number of top menu items