<?php
@session_start();
class EventosController extends Pampa_Controller_Action_Site {


  public function init() {
    parent::init();
    $this->view->menu = 'agenda';
  }

  public function indexAction() {
    $this->forward('lista');
  }
  public function listaAction() {
    
    $this->view->headTitle("Eventos");
    $this->view->classmain = 'interna';
    $Model = new Model_Agendas();
     $filters = array(
            "t" => $this->_getParam("t", 12),
            "p" => $this->_getParam("p", 1),
            "s" => $this->_getParam("s"),
            "old" => $this->_getParam("old"),
    );

    $this->view->filters = $filters;
    $this->view->old = $this->_getParam("old");

    // retrieves the items list
    $this->view->items = $Model->siteList($filters);
   
  }

  public function verAction() {
    $this->view->headTitle("Eventos");
    $objid = $this->_getParam("id");
    $Model = new Model_Agendas();

    $obj = $Model->find($objid)->current();
    $this->view->headTitle($obj->titulo);
    $this->view->obj = $obj;
    $this->view->classmain = 'interna noticias';
  }
 
}

