refactoring. add support of showing children pages.