How to assign an array contact details view template???

controller file view.details.php
class ContactsViewDetail extends ViewDetail
* @see SugarView::display()
* We are overridding the display method to manipulate the portal information.
* If portal is not enabled then don’t show the portal fields.
public function display(){
global $sugar_config;

	$aop_portal_enabled = !empty($sugar_config['aop']['enable_portal']) && !empty($sugar_config['aop']['enable_aop']);
    //echo '<pre>===='; print_r($aop_portal_enabled); exit; 
	$this->ss->assign("AOP_PORTAL_ENABLED", $aop_portal_enabled);


	$admin = new Administration();
	$obj         = new AirtelUserInfo();
	$res         = $obj->test();
	$sql = 'select * from contacts';
	//$result = $this->db->query($sql,true," Error filling in additional detail fields: ");

	// Get the id and the name.
	//$row = $this->db->fetchByAssoc($result);
	//echo '<pre>'; print_r($sql); exit;
	$this->ss->assign("res", $res);
	if(isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
		$this->ss->assign("PORTAL_ENABLED", true);


tempalte file Detailview.template