bool contains(NPage page) { if (this == page) return true; for (var child in pages) { if (child.contains(page)) return true; } return false; }