⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

display image in view



Marcos Andrade

Marcos Andrade
  • profile picture
  • Member

Posted 04 March 2015 - 00:46 AM

Sorry if my English is bad, I am Brazilian and I'm using google to translate.

I started recently with codeigniter + grocerycrud and I am very liked

 

I would like to display an image on a list but is only generated the link, follow my code:

 

$crud = new grocery_CRUD();
                        
                      
$crud->set_theme('alunos');
$crud->set_table('alunos');
$crud->set_subject('Alunos');
$crud->columns('id_aluno','nome_aluno','foto_aluno');
 $crud->set_field_upload('foto_aluno','assets/uploads/fotos');
 $crud->display_as('id_aluno','Matrícula')
                              ->display_as('nome_aluno','Nome') 
                           
                              ->display_as('responsavel_aluno','Responsável')
                              ;
                            
                      $crud->callback_after_upload(array($this,'example_callback_after_upload'));
 
$output = $crud->render();
 
$this->_example_output($output);

 

Can anyone help?