code: def is_parent_of(page1, page2):
      
  
      try:
          return page1.tree_id == page2.tree_id and page1.lft < page2.lft and page1.rght > page2.rght
      except AttributeError:
          return False
docs: Determines whether a given page is the parent of another page
  
      Example::
  
          {% if page|is_parent_of:feincms_page %} ... {% endif %}