ContentHelperRoute::getArticleRoute($id) returns old ugly URL

26 views
Skip to first unread message

Carl Whalley

unread,
Feb 5, 2018, 6:12:19 PM2/5/18
to Joomla! General Development
Given an article id, how can I get the URL when Modern URL's are active? I want "category/title", not the old "option=com_content&view=article&id=" way, which is the closest I got using the API in the subject.

Carl Whalley

unread,
Feb 6, 2018, 6:02:02 AM2/6/18
to Joomla! General Development
I tried JRoute::_(ContentHelperRoute::getArticleRoute($id)) but that adds "/component/content/article" before the title, which I don't want, and doesn't show the category I see in the real URL, which I do want.
Reply all
Reply to author
Forward
0 new messages