Created
November 2, 2017 12:24
-
-
Save CB9TOIIIA/9f4041160ab1f6c44f12785d6fb6ffb9 to your computer and use it in GitHub Desktop.
sef url joomla
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); | |
$rootURL = rtrim(JURI::base(),'/'); | |
$subpathURL = JURI::base(true); | |
if(!empty($subpathURL) && ($subpathURL != '/')) { | |
$rootURL = substr($rootURL, 0, -1 * strlen($subpathURL)); | |
} | |
$itemUrl = $rootURL.JRoute::_(ContentHelperRoute::getArticleRoute($item->id, $item->catid)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment