<?php // Get all locations $ regionName = ”; $ subLocations = array(); $ result = Regions::model()->find(CConfig::get(‘db.prefix’).’regions.id = :id’, array(‘i:id’=>$ listing->region_id)); $ region = !empty($ result) ? $ result->getFieldsAsArray() : array(); $ this->_view->listingLocation = !empty($ region[‘name’]) ? $ region[‘name’] : ”; $ result = Regions::model()->find(‘parent_id = :parent_id’, array(‘i:parent_id’=>$ listing->region_id)); $ parentRegion = !empty($ result) ?Read more