I would like to show a page depending on whether it has a subpage or not.
That is, if you have subpages, do not display the subpages, only the parent page to which it belongs.
Something like this:
Books of science Book 1 Book 2
Books of science fiction Book 1 Book 2
I have a home page where I want to show all the books, that is, all the main pages:
Books of science Books of science fiction
And the idea is, not to show the subpages because it doesn't make sense in my case.
Is it possible?