/** * Relative to the module base, not the webroot. * * @return string */ function getRelativeLink() { $link = rtrim(DocumentationService::trim_extension_off($this->getRelativePath()), '/'); // folders should have a / on them. Looks nicer try { if (is_dir($this->getPath())) { $link .= '/'; } } catch (Exception $e) { } return $link; }