/** * Muestra un articulo dado su Slug * * @param string $slug */ public function ver($slug = NULL) { if (Input::is('GET') && $slug) { $articulo = new Articulo(); $this->articulo = $articulo->getEntryBySlug($slug); $this->pageTitle = $articulo->titulo . ' - simacel.com'; //Verificando q existan entradas if ($this->articulo == NULL) { $this->pageTitle = 'Ops! no se Encontraron Noticias - simacel.com'; View::select('no_entry'); } $this->comentarios = Load::model('comentario')->getCommentByPost($this->articulo->id); $this->countComment = count($this->comentarios); } else { Router::route_to('action: index'); } }
/** * Muestra un articulo dado su Slug * * @param string $slug */ public function ver($slug = NULL) { if ($slug) { $articulo = new Articulo(); $recaptcha = new Recaptcha(); $this->articulo = $articulo->getEntryBySlug($slug); $this->pageTitle = $articulo->titulo . ' - ' . $this->pageTitle; //Verificando que existan entradas if ($this->articulo == NULL) { $this->pageTitle = 'Ops! no se Encontraron Noticias - ' . $this->pageTitle; View::select('no_entry'); } $this->comentarios = Load::model('comentario')->getCommentByPost($this->articulo->id); $this->countComment = count($this->comentarios); $this->captcha = $recaptcha->generar(); } else { Router::route_to('action: index'); } }