jroute($url, $xhtml = true, $ssl = null)

This function is a proxy of Joomla\CMS\Router\Route::_(). It allows to build SEF urls inside twig layouts.

  1. Parameters
  2. Returns
  3. Examples

Parameters

  • string $url Absolute or Relative URI to Joomla resource.
  • boolean $xhtml Replace & by & for XML compliance.
  • integer $ssl Secure state for the resolved URI.
    • 0: (default) No change, use the protocol currently used in the request
    • 1: Make URI secure using global secure site URI.
    • 2: Make URI unsecure using the global unsecure site URI.

Returns

string The translated humanly readable URL.

Examples


{#  Load a profiler and mark to points before and after doing something #}
<a href="{{ jroute('index.php?option=com_content&view=category&id=27')}}">View category</a>