public function getBasepath($suffix = null)
    {
        $relativeDirectory = '.';

        $givenRelativePath = dirname($this->getCurrentPage());

        if ($givenRelativePath === '/') {
            $givenRelativePath = '';
        }

        $depth = substr_count($givenRelativePath, '/');

        for ($i = 0; $i < $depth; $i++) {
            $relativeDirectory .= '/..';
        }

        if ($suffix) {
            return $relativeDirectory . '/' . $suffix;
        } else {
            return $relativeDirectory;
        }
    }