implement position in tree for show_menu template tag.