Add and implement pages and page dialog.