page.php add isOrphan()
page.php add isDeadend()

minor fixed to isorphan
add template paramters and check