public function isActive($id, $exact = false)
{
$current = $this->pageStack->getCurrentPage();
$url = $this->pageStack->getNodeUrl($current, true, true);
$purl = $this->pageStack->getNodeUrl($id, true, true);
if ($url === $purl) {
return true;
}
if (!$exact) {
if ($url && $purl) {
$pos = strpos($url, $purl);
if ($url == '/' || $pos != 0 || $pos === false) {
return false;
} else {
return true;
}
}
}
}