protected function getNodeLevelInSite(NodeInterface $node) { $siteNode = $this->currentNode->getContext()->getCurrentSiteNode(); return $node->getDepth() - $siteNode->getDepth(); }