Jarves\PageStack::getCurrentUrlAffix PHP Method

getCurrentUrlAffix() public method

If the current page is : /documentation/field, but the actual loaded route is: /documentation/field/field-name, then '/field-name' is returned. This can be the case, when a plugin added own routes and returned a result for '/field-name'.
public getCurrentUrlAffix ( ) : string
return string
    public function getCurrentUrlAffix()
    {
        $pathInfo = $this->getRequest()->getPathInfo();
        //with leading /
        $currentUrl = $this->getCurrentUrl();
        //without leading /
        return substr(ltrim($pathInfo, '/'), strlen($currentUrl));
    }