'Search the path upwards recursively and load the whole route of
names and ids for breadcrumb building purposes.
:param folder: current folder for navigating up
:param type:   Galaxy LibraryFolder
:returns:   list consisting of full path to the library
:type:      list'

def _build_path(self, trans, folder):

    path_to_root = []
    if (folder.parent_id is None):
        path_to_root.append((('F' + trans.security.encode_id(folder.id)), folder.name))
    else:
        path_to_root.append((('F' + trans.security.encode_id(folder.id)), folder.name))
        upper_folder = trans.sa_session.query(trans.app.model.LibraryFolder).get(folder.parent_id)
        path_to_root.extend(self._build_path(trans, upper_folder))
    return path_to_root
