def get_full_index(route=None, app=None):
 if (not frappe.local.flags.children_map):
  from frappe.website.router import get_pages
  children_map = {}
  pages = get_pages(app=app)
  for (route, page_info) in pages.iteritems():
   parent_route = os.path.dirname(route)
   children_map.setdefault(parent_route, []).append(page_info)
   if frappe.flags.local_docs:
    page_info.extn = u'.html'
  for (route, children) in children_map.items():
   page_info = pages[route]
   if page_info.index:
    new_children = []
    page_info.extn = u''
    for name in page_info.index:
     child_route = ((page_info.route + u'/') + name)
     if (child_route in pages):
      new_children.append(pages[child_route])
    for c in children:
     if (c not in new_children):
      new_children.append(c)
    children_map[route] = new_children
  frappe.local.flags.children_map = children_map
 return frappe.local.flags.children_map

def get_full_index ( route = None , app = None ) : if ( not frappe . local . flags . children_map ) : from frappe . website . router import get_pages children_map = { } pages = get_pages ( app = app ) for ( route , page_info ) in pages . iteritems ( ) : parent_route = os . path . dirname ( route ) children_map . setdefault ( parent_route , [ ] ) . append ( page_info ) if frappe . flags . local_docs : page_info . extn = u'.html' for ( route , children ) in children_map . items ( ) : page_info = pages [ route ] if page_info . index : new_children = [ ] page_info . extn = u'' for name in page_info . index : child_route = ( ( page_info . route + u'/' ) + name ) if ( child_route in pages ) : new_children . append ( pages [ child_route ] ) for c in children : if ( c not in new_children ) : new_children . append ( c ) children_map [ route ] = new_children frappe . local . flags . children_map = children_map return frappe . local . flags . children_map
returns full index of the website for www upto the n-th level .