/** Formulario para añadir una imagen nueva ( de la biblioteca o upload )(ajax) **/ public function imagenesNoticia($idnoticia) { $noticia = new Noticia($idnoticia); $foto = new Foto(); $this->data['fotos'] = $foto->where_related('noticia', 'id is null')->get()->all; $this->data['noticia'] = $noticia; $this->load->view('admin/noticias/fotos', $this->data); }