protected function getTermPermalink($TermRelativePath)
    {
        if (is_null($TermRelativePath)) {
            return;
        }

        $result = $TermRelativePath;
        $basename = basename($TermRelativePath);

        if ($basename === 'index.html') {
            $result = dirname($TermRelativePath);

            if ($result === '.') {
                $result = '';
            }
        }

        return '/'.$result;
    }