Created
September 7, 2018 09:22
-
-
Save CB9TOIIIA/bf7b999bdb25b28c89b1fd259311db84 to your computer and use it in GitHub Desktop.
front url joomla 2.5 from backend
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
JFactory::getApplication('site')->initialise(); | |
$itemUrl = JRoute::_(ContentHelperRoute::getArticleRoute($article->id, $article->catid)); | |
$app = JFactory::getApplication(); | |
$app = JApplication::getInstance('site'); | |
$router = $app->getRouter(); | |
$route = $router->build((ContentHelperRoute::getArticleRoute($article->id))); | |
// $fronturl = rtrim(JUri::root(), '/') . preg_replace('/administrator\//', '', $route, 1); | |
$fronturl = rtrim(JUri::root(), '/') . preg_replace('/administrator\//', 'purge/', $route, 1); | |
// jbdump::log($fronturl); | |
$fronturl = preg_replace('/(\?id=\d+)/', '', $fronturl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment