Replacing getBreadcrumb with getPath function