Introduction

JContentHelper is a simple helper to get some Joomla content component information.

Get Article Link

echo \Windwalker\Helper\JContent::getArticleLink('35:alias-link-url', 7);

Retun this URL: category/subcategory/35-alias-link-url.html

Same as this code:

include_once JPATH_ROOT.'/components/com_content/helpers/route.php' ;

echo JRoute::_(ContentHelperRoute::getArticleRoute($slug, $catslug));

Get Category Link

echo \Windwalker\Helper\JContentHelper::getCategoryLink(11);

Return: category.html

Same as:

include_once JPATH_ROOT.'/components/com_content/helpers/route.php' ;

echo JRoute::_(ContentHelperRoute::getCategoryRoute($catid));

Found a typo? Help us improve this document.

This document is for Windwalker Joomla RAD, if you are finding Windwalker PHP framework, please see: Windwalker Framework