function pathway() { global $mainframe; $Itemid = $this->getItemid(); require_once JPATH_SITE . DS . 'components' . DS . 'com_properties' . DS . 'helpers' . DS . 'link.php'; $breadcrumbs =& $mainframe->getPathWay(); $link = 'index.php?option=com_properties&view=properties&Itemid=' . $Itemid; if (JRequest::getVar('cyid')) { $cyid = JRequest::getVar('cyid', 0, '', 'int'); $query = ' SELECT cy.*, ' . ' CASE WHEN CHAR_LENGTH(cy.alias) THEN CONCAT_WS(":",cy.id, cy.alias) ELSE cy.id END as CYslug' . ' FROM #__properties_country as cy ' . ' WHERE cy.id = ' . $cyid; $this->_db->setQuery($query); $this->_dataCountry = $this->_db->loadObject($query); $link .= '&cyid=' . $this->_dataCountry->CYslug; $breadcrumbs->addItem($this->_dataCountry->name, JRoute::_($link)); } if (JRequest::getVar('sid')) { $sid = JRequest::getVar('sid', 0, '', 'int'); $query = ' SELECT s.*, ' . ' CASE WHEN CHAR_LENGTH(s.alias) THEN CONCAT_WS(":",s.id, s.alias) ELSE s.id END as Sslug' . ' FROM #__properties_state as s ' . ' WHERE s.id = ' . $sid; $this->_db->setQuery($query); $this->_dataState = $this->_db->loadObject($query); $link .= '&sid=' . $this->_dataState->Sslug; $breadcrumbs->addItem($this->_dataState->name, JRoute::_($link)); } if (JRequest::getVar('lid')) { $lid = JRequest::getVar('lid', 0, '', 'int'); $query = ' SELECT l.*, ' . ' CASE WHEN CHAR_LENGTH(l.alias) THEN CONCAT_WS(":",l.id, l.alias) ELSE l.id END as Lslug' . ' FROM #__properties_locality as l ' . ' WHERE l.id = ' . $lid; $this->_db->setQuery($query); $this->_dataLocality = $this->_db->loadObject($query); $link .= '&lid=' . $this->_dataLocality->Lslug; $breadcrumbs->addItem($this->_dataLocality->name, JRoute::_($link)); } if (JRequest::getVar('cid')) { $cid = JRequest::getVar('cid', 0, '', 'int'); $query = ' SELECT c.*, ' . ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":",c.id, c.alias) ELSE c.id END as Cslug' . ' FROM #__properties_category as c ' . ' WHERE c.id = ' . $cid; $this->_db->setQuery($query); $this->_dataCategory = $this->_db->loadObject($query); $query2 = ' SELECT c.*, ' . ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":",c.id, c.alias) ELSE c.id END as Cslug' . ' FROM #__properties_category as c ' . ' WHERE c.id = ' . $this->_dataCategory->parent; $this->_db->setQuery($query2); $this->_dataParentCategory = $this->_db->loadObject($query2); if ($this->_dataParentCategory) { $link2 = $link .= '&cid=' . $this->_dataParentCategory->Cslug; $link = LinkHelper::getLink('properties', 'showcategory', '', '', '', '', $this->_dataParentCategory->Cslug, '', ''); $breadcrumbs->addItem($this->_dataParentCategory->name, JRoute::_($link)); } $link3 = $link .= '&cid=' . $this->_dataCategory->Cslug; $link = LinkHelper::getLink('properties', 'showcategory', '', '', '', '', $this->_dataParentCategory->Cslug, '', ''); $breadcrumbs->addItem($this->_dataCategory->name, JRoute::_($link)); } if (JRequest::getVar('tid')) { $tid = JRequest::getVar('tid', 0, '', 'int'); $query = ' SELECT t.*, ' . ' CASE WHEN CHAR_LENGTH(t.alias) THEN CONCAT_WS(":",t.id, t.alias) ELSE t.id END as Tslug' . ' FROM #__properties_type as t ' . ' WHERE t.id = ' . $tid; $this->_db->setQuery($query); $this->_dataType = $this->_db->loadObject($query); $link .= '&tid=' . $this->_dataType->Tslug; $link = LinkHelper::getLink('properties', 'showcategory', '', '', '', '', $this->_dataParentCategory->Cslug, $this->_dataType->Tslug, ''); $breadcrumbs->addItem($this->_dataType->name, JRoute::_($link)); } }