Hide sub menus if all pages in the sub menu is hidden.
Simplifying code for previous commit
Merge pull request #5803 from riceri/master

Hide sub menus if all pages in the sub menu is hidden.
[#5803] Added note to README.md
Merge branch 'feature/5803' into develop

Close #5803
Fixes #2925