[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: pathway.php 10752 2008-08-23 01:53:31Z eddieajau $ 4 * @package Joomla.Framework 5 * @subpackage Application 6 * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant 9 * to the GNU General Public License, and as distributed it includes or 10 * is derivative of works licensed under the GNU General Public License or 11 * other free or open source software licenses. 12 * See COPYRIGHT.php for copyright notices and details. 13 */ 14 15 // Check to ensure this file is within the rest of the framework 16 defined('JPATH_BASE') or die(); 17 18 /** 19 * Class to manage the site application pathway 20 * 21 * @package Joomla 22 * @since 1.5 23 */ 24 class JPathwaySite extends JPathway 25 { 26 /** 27 * Class constructor 28 */ 29 function __construct($options = array()) 30 { 31 //Initialise the array 32 $this->_pathway = array(); 33 34 $menu =& JSite::getMenu(); 35 36 if($item = $menu->getActive()) 37 { 38 $menus = $menu->getMenu(); 39 $home = $menu->getDefault(); 40 41 if(is_object($home) && ($item->id != $home->id)) 42 { 43 foreach($item->tree as $menupath) 44 { 45 $url = ''; 46 $link = $menu->getItem($menupath); 47 48 switch($link->type) 49 { 50 case 'menulink' : 51 case 'url' : 52 $url = $link->link; 53 break; 54 case 'separator' : 55 $url = null; 56 break; 57 default : 58 $url = 'index.php?Itemid='.$link->id; 59 } 60 61 $this->addItem( $menus[$menupath]->name, $url); 62 63 } // end foreach 64 } 65 } // end if getActive 66 } 67 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body