added public flag to show and view pages