Actions

API16

JRouter

From Joomla! Documentation

Revision as of 18:38, 10 August 2010 by Chouaibi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

[Edit Descripton] 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.

Contents

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' );

[Edit See Also] SeeAlso:JRouter

Examples

<CodeExamplesForm />

This is a Test

This is a Test

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