API17

JRoute

From Joomla! Documentation

Revision as of 21:25, 11 May 2013 by JoomlaWikiBot (talk | contribs) (moving preparation)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Joomla 11.1 JRoute[edit]

Description[edit]

Template:Description:JRoute [Edit Descripton]

Methods[edit]

Visibility Method name Description
public static _ Translates an internal Joomla URL to a humanly readible URL.
  • Defined in libraries/joomla/methods.php

Importing[edit]

jimport( 'joomla.methods' );

See also[edit]

Template:SeeAlso:JRoute [Edit See Also]

User contributed notes[edit]

<CodeExamplesForm />


Suggest the following as a more useful entry: This is largely taken from the API pages.

Translates an internal Joomla URL to a humanly readible URL.

   return: translated humanly readible URL.
   since: 11.1
   access: public

The _ (string $url, [boolean $xhtml = true], [integer $ssl = null])

   string $url: Absolute or Relative URI to Joomla resource.
   boolean $xhtml: Replace & with & for XML compilance.
   integer $ssl: Secure state for the resolved URI. 1: Make URI secure using global secure site URI. 0: Leave URI in the same secure state as it was passed to the function. -1: Make URI unsecure using the global unsecure site URI.

Example - create a human-readable link to the login page without replacing ampersands (&):

JRoute::_('index.php?option=com_users&view=login', false);