<?php 
class LYTSuper extends AppLayout {
	

	protected $_phtml = 'super';

	public $reg_cabecera;
	public $reg_contenido;
	public $reg_navegacion;
	public $reg_pie;
	public $reg_miga;
	public $reg_titulo;
	
	//private $_elementos = array();
	
	/*public function __construct(){
		$this->init();
	}*/
	
	public function init() {
		$this->reg_cabecera  = new  VstCaja('header', VstCaja::TIPO_HEADER);
		$this->reg_navegacion  = new  VstCaja('left-panel', VstCaja::TIPO_ASIDE);
		$this->reg_contenido = new VstCaja('con',VstCaja::TIPO_NORMAL,'','well');
		$this->reg_miga = new VstCaja('ribbon');
		$this->reg_titulo = new VstTitulo();
		
		
	}
	
	public function render(){
	
		ob_start();
		$normal = APPLICATION_PATH . '/app/layouts/'. $this->_phtml .'.phtml';
	
		if(is_file($normal))
			include $normal;
	
		$salida = ob_get_clean();
		return $salida;
	}
	
	public function renderAjax(){
	
		ob_start();
		$normal = APPLICATION_PATH . '/app/layouts/'. $this->_phtml .'_ajax.phtml';
	
		if(is_file($normal))
			include $normal;
	
		$salida = ob_get_clean();
		return $salida;
	}
	
	
	public function renderModal(){
		return $this->reg_contenido->render();
	}
	
	
	public function getPhtml(){
		return $this->_phtml;
	}
	
}