Navigation of multi-site


I’m attempting to segregate sites into multiple sites. I’ve converted the node to a site, and everything works great when I’m viewing the site outside the editor. However, when navigating within the admin panel, it includes the top-level parent in the navigation (/Geo/about-us, for example, instead of just /about-us). I have the following for my navigation code:

if(\Pimcore\Model\Site::isSiteRequest()) {
    $site = \Pimcore\Model\Site::getCurrentSite();
    $mainNavStartNode = $site->getRootDocument();
} else {
    $mainNavStartNode = \Pimcore\Model\Document::getById(93);
<div class="navigation-header responsive-menu-toggle-class">
    <div class="title">Navigation</div>
        <div class="close-menu"></div>
    <div class="nav-overflow">
        <nav style="padding:0px; max-width:100%;">
                $mainNavigation = $this->navigation()->buildNavigation($document, $mainNavStartNode);
                    'order' => -1, // put it in front of all the others
                    'uri' => '/', //path to homepage
                    'label' => 'home', //visible label
                    'title' => 'Homepage' //tooltip text

                echo $this->navigation()->render($mainNavigation, 'menu', 'renderMenu', [
                    'maxDepth' => 1,
                    'ulClass'  => ''


We normally set the main nav node as property in documents - as can be seen in demo basic and here.

Because inside admin panel it will never be a site request…




Sorry for the delayed reply, that seemed to work quite nicely! Thank you again for your help.

EDIT: Apparently, I just thought it was working because I had a workaround in place for navigation where I stripped the /Geo prefix. Is there a more eloquent way to do this that applies to the navigation, breadcrumbs and any sub pages that appear in the body?