You can get article's non-SEF link using Joomla\Component\Content\Site\Helper\RouteHelper::getArticleRoute(). Run in through Joomla\CMS\Router\Route::_() to get the SEF link:
Code:
use Joomla\CMS\Router\Route;use Joomla\Component\Content\Site\Helper\RouteHelper;$link = Route::_(RouteHelper::getArticleRoute($article->id . ':' . $article->alias, $article->catid, $article->language));
Statistics: Posted by SharkyKZ — Sat Apr 27, 2024 6:29 pm