def get_children_of(self, route):
		"""Return list of children of given route, for generating index in Web Page"""

		condition = 'parent_website_route = %s'
		if route=="index" or not route:
			condition = 'ifnull(parent_website_route, "") = %s and name != "index"'
			route = ""

		children = frappe.db.sql("""select name, page_name,
			parent_website_route, {title_field} as title from `tab{doctype}`
			where {condition}
			order by {order_by}""".format(
				doctype = self.doctype,
				title_field = self.website.page_title_field or "name",
				order_by = self.website.order_by or "idx asc",
				condition = condition
			), route, as_dict=True)

		for c in children:
			c.name = make_route(c)

		return children
dataset/ETHPy150Open frappe/frappe/frappe/website/website_generator.py/WebsiteGenerator.get_children_of/original