API15:JApplication/appendPathWay
From Joomla! Documentation
Description
Deprecated functions Deprecated, use JPathWay->addItem() method instead.
<! removed transcluded page call, red link never existed >
Syntax
appendPathWay($name, $link=null)
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | ||
| $link | null |
Defined in
libraries/joomla/application/application.php
Importing
jimport( 'joomla.application.application' );
Source Body
function appendPathWay( $name, $link = null )
{
/*
* To provide backward compatability if no second parameter is set
* set it to null
*/
if ($link == null) {
$link = '';
}
$pathway =& $this->getPathway();
if( defined( '_JLEGACY' ) && $link == '' )
{
$matches = array();
$links = preg_match_all ( '/<a[^>]+href="([^"]*)"[^>]*>([^<]*)<\/a>/ui', $name, $matches, PREG_SET_ORDER );
foreach( $matches AS $match) {
// Add each item to the pathway object
if( !$pathway->addItem( $match[2], $match[1] ) ) {
return false;
}
}
return true;
}
else
{
// Add item to the pathway object
if ($pathway->addItem($name, $link)) {
return true;
}
}
return false;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples