prestasafe Posted July 9, 2015 Share Posted July 9, 2015 Salut à tous, je mets à jour mon module d'actualités et je cherche à afficher une image dans le renderForm() et le renderList(); Voici mon renderForm() public function renderForm() { $this->fields_form = array( 'tinymce' => true, 'legend' => array( 'title' => $this->l('News'), 'image' => '../img/admin/edit.gif' ), 'input' => array( array( 'type' => 'text', 'lang' => true, 'label' => $this->l('Title:'), 'name' => 'title', 'size' => 40 ), array( 'type' => 'file', 'name' => 'image', 'multiple' => true, 'label' => $this->l('Choose combinations file'), 'desc' => $this->l('Terms display on the top of the form.'), 'lang' => true, 'id' => 'image' ), array( 'type' => 'textarea', 'lang' => true, 'label' => $this->l('Contenu:'), 'name' => 'txt', 'autoload_rte' => true, ) ), 'submit' => array( 'title' => $this->l('Save'), 'class' => 'button' ) ); if (!($obj = $this->loadObject(true))) return; $this->initToolbar(); return parent::renderForm(); } et mon renderList() public function renderList() { $this->addRowAction('edit'); $this->addRowAction('delete'); //$this->addRowAction('details'); $this->bulk_actions = array( 'delete' => array( 'text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?') ) ); $this->fields_list = array( 'id_news' => array( 'title' => $this->l('ID'), 'align' => 'center', 'width' => 25 ), 'title' => array( 'title' => $this->l('title'), 'width' => 'auto', ), 'image' => array( 'title' => $this->l('Image'), 'width' => 'auto', 'image_id' => '' ) ); $lists = parent::renderList(); $this->initToolbar(); return $lists; } J'ai fouillé dans le AdminProducts, ça ramène sur le helperList qui ramène sur le HelperCore..; Fin bref si quelqu'un à dejà rencontré ça ça m'aiderai bien Merci d'avance. Je tiens à préciser que je suis dans un ModuleAdminController Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now