code: def in_navitem(self, resources, nav_href):
          
  
          # The navhref might end with '/index' so remove it if so
          if nav_href.endswith('/index'):
              nav_href = nav_href[:-6]
  
          return self.docname.startswith(nav_href)
docs: Given  href of nav item, determine if resource is in it