Select the URIs of the articles at frontpage or category view

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
Xadomir
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Nov 23, 2010 1:33 pm

Select the URIs of the articles at frontpage or category view

Post by Xadomir » Mon Mar 05, 2018 6:10 pm

When I select the URI from a article, then do it with:

Code: Select all

JURI::current();
However, this way works only in the single view of an article.
Is there a way to select the URIs of all the single articles at the frontpage or a category view?
Thanks for your ideas.

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2863
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Select the URIs of the articles at frontpage or category view

Post by SharkyKZ » Mon Mar 05, 2018 8:12 pm

Use ContentHelperRoute::getArticleRoute(). This is what's used in category view to display links to articles:

Code: Select all

JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language));


Locked

Return to “Joomla! 3.x Coding”