API16

JRouter: Difference between revisions

From Joomla! Documentation

New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JRouter}} ===Defined in=== libraries/j...
 
m preparing for archive only
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span class="editsection" style="font-size:76%;">
[[JRouter]] is an abstract class to create and parse routes. You need to write your own concrete router Class to make use of its functionality. The Joomla CMS uses the '''JRouterSite''' class as concrete router implementation. For further information see below.
<nowiki>[</nowiki>[[Description:JRouter|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
===JRouter, the Joomla CMS and writing your own SEO components===
{{Description:JRouter}}
JRouter is an abstract class of the ''Joomla Framework''. The ''Joomla CMS'' is a concrete application, using the Joomla Framework. Thus, they have created their own concrete Router class, which handles routes. This concrete Router is called '''JRouterSite''' and can be found in <code>includes/router.php</code>.
 
If you take a look at the private _buildSefRoute method of this class, you'll quickly realise that the Joomla Developers allow you to create your own custom routing handlers for each of your components. This way you can make your components SEO friendly. If you want to learn how to write such an handler, take a look [[Supporting SEF URLs in your component]] and visit the section ''[[Supporting SEF URLs in your component#The Component Router|The Component Router]]''


===Defined in===
===Defined in===
Line 20: Line 22:
<source lang="php">jimport( 'joomla.application.router' );</source>
<source lang="php">jimport( 'joomla.application.router' );</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JRouter|Edit See Also]]<nowiki>]</nowiki>
 
</span>
{{SeeAlso:JRouter}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=JRouter
  category=JRouter
  category=CodeExample
  namespace=CodeExample
  category=ClassExample
  category=ClassExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 02:01, 25 March 2017

JRouter is an abstract class to create and parse routes. You need to write your own concrete router Class to make use of its functionality. The Joomla CMS uses the JRouterSite class as concrete router implementation. For further information see below.

JRouter, the Joomla CMS and writing your own SEO components

JRouter is an abstract class of the Joomla Framework. The Joomla CMS is a concrete application, using the Joomla Framework. Thus, they have created their own concrete Router class, which handles routes. This concrete Router is called JRouterSite and can be found in includes/router.php.

If you take a look at the private _buildSefRoute method of this class, you'll quickly realise that the Joomla Developers allow you to create your own custom routing handlers for each of your components. This way you can make your components SEO friendly. If you want to learn how to write such an handler, take a look Supporting SEF URLs in your component and visit the section The Component Router

Defined in

libraries/joomla/joomla/application/router.php

Methods

Method name Description
__construct Method to instantiate the router.

Importing

jimport( 'joomla.application.router' );



Examples

Code Examples

This is a Test

This is a Test

Doxiki 14:23, 21 March 2010 (EDT) Edit comment